File tree 2 files changed +9
-0
lines changed
src/darwin/Framework/CHIP
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ typedef NS_ERROR_ENUM(CHIPErrorDomain, CHIPErrorCode){
49
49
CHIPErrorCodeInvalidState = 6 ,
50
50
CHIPErrorCodeWrongAddressType = 7 ,
51
51
CHIPErrorCodeIntegrityCheckFailed = 8 ,
52
+ CHIPErrorCodeTimeout = 9 ,
52
53
};
53
54
// clang-format on
54
55
Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ + (NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode
77
77
userInfo: @{ NSLocalizedDescriptionKey : NSLocalizedString(@" Integrity check failed." , nil ) }];
78
78
}
79
79
80
+ if (errorCode == CHIP_ERROR_TIMEOUT) {
81
+ return [NSError errorWithDomain: CHIPErrorDomain
82
+ code: CHIPErrorCodeTimeout
83
+ userInfo: @{ NSLocalizedDescriptionKey : NSLocalizedString(@" Transaction timed out." , nil ) }];
84
+ }
85
+
80
86
return [NSError errorWithDomain: CHIPErrorDomain
81
87
code: CHIPErrorCodeGeneralError
82
88
userInfo: @{
@@ -237,6 +243,8 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error
237
243
return CHIP_ERROR_INCORRECT_STATE;
238
244
case CHIPErrorCodeIntegrityCheckFailed:
239
245
return CHIP_ERROR_INTEGRITY_CHECK_FAILED;
246
+ case CHIPErrorCodeTimeout:
247
+ return CHIP_ERROR_TIMEOUT;
240
248
default :
241
249
return CHIP_ERROR_INTERNAL;
242
250
}
You can’t perform that action at this time.
0 commit comments