From 053e06ff2ea453a87170222b50340aa68f0fc37c Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Wed, 19 May 2021 17:33:56 +0800 Subject: [PATCH] iOS: fix when main bundle load error, exception is nil --- doric-iOS/Pod/Classes/Loader/DoricMainBundleJSLoader.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doric-iOS/Pod/Classes/Loader/DoricMainBundleJSLoader.m b/doric-iOS/Pod/Classes/Loader/DoricMainBundleJSLoader.m index 6a6da103..8273d10b 100644 --- a/doric-iOS/Pod/Classes/Loader/DoricMainBundleJSLoader.m +++ b/doric-iOS/Pod/Classes/Loader/DoricMainBundleJSLoader.m @@ -32,7 +32,9 @@ - (BOOL)filter:(NSString *)source { NSError *error; NSString *jsContent = [NSString stringWithContentsOfFile:fullPath encoding:NSUTF8StringEncoding error:&error]; if (error) { - [ret setupError:[NSException new]]; + [ret setupError:[NSException exceptionWithName:@"Loading JS in Main bundle error" + reason:error.description + userInfo:error.userInfo]]; } else { [ret setupResult:jsContent]; }