iOS: fix when main bundle load error, exception is nil
This commit is contained in:
parent
d7c5de4b90
commit
053e06ff2e
@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user