From 69aaf03345ec2acf40c9deaa5170d15652deb0dc Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Fri, 20 May 2022 03:35:47 -0700 Subject: [PATCH] allow catch all exceptions (#11498) --- js/react_native/ios/OnnxruntimeModule.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/react_native/ios/OnnxruntimeModule.mm b/js/react_native/ios/OnnxruntimeModule.mm index e22e3f3997..ab56fd3438 100644 --- a/js/react_native/ios/OnnxruntimeModule.mm +++ b/js/react_native/ios/OnnxruntimeModule.mm @@ -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); } }