allow catch all exceptions (#11498)

This commit is contained in:
Yulong Wang 2022-05-20 03:35:47 -07:00 committed by GitHub
parent a67994316a
commit 69aaf03345
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ RCT_EXPORT_METHOD(loadModel
@try {
NSDictionary *resultMap = [self loadModel:modelPath options:options];
resolve(resultMap);
} @catch (NSException *exception) {
} @catch (...) {
reject(@"onnxruntime", @"can't load model", nil);
}
}
@ -66,7 +66,7 @@ RCT_EXPORT_METHOD(run
@try {
NSDictionary *resultMap = [self run:url input:input output:output options:options];
resolve(resultMap);
} @catch (NSException *exception) {
} @catch (...) {
reject(@"onnxruntime", @"can't run model", nil);
}
}