Skip to content

Commit 69aaf03

Browse files
authored
allow catch all exceptions (microsoft#11498)
1 parent a679943 commit 69aaf03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/react_native/ios/OnnxruntimeModule.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ @implementation OnnxruntimeModule
4141
@try {
4242
NSDictionary *resultMap = [self loadModel:modelPath options:options];
4343
resolve(resultMap);
44-
} @catch (NSException *exception) {
44+
} @catch (...) {
4545
reject(@"onnxruntime", @"can't load model", nil);
4646
}
4747
}
@@ -66,7 +66,7 @@ @implementation OnnxruntimeModule
6666
@try {
6767
NSDictionary *resultMap = [self run:url input:input output:output options:options];
6868
resolve(resultMap);
69-
} @catch (NSException *exception) {
69+
} @catch (...) {
7070
reject(@"onnxruntime", @"can't run model", nil);
7171
}
7272
}

0 commit comments

Comments
 (0)