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;
|
NSError *error;
|
||||||
NSString *jsContent = [NSString stringWithContentsOfFile:fullPath encoding:NSUTF8StringEncoding error:&error];
|
NSString *jsContent = [NSString stringWithContentsOfFile:fullPath encoding:NSUTF8StringEncoding error:&error];
|
||||||
if (error) {
|
if (error) {
|
||||||
[ret setupError:[NSException new]];
|
[ret setupError:[NSException exceptionWithName:@"Loading JS in Main bundle error"
|
||||||
|
reason:error.description
|
||||||
|
userInfo:error.userInfo]];
|
||||||
} else {
|
} else {
|
||||||
[ret setupResult:jsContent];
|
[ret setupResult:jsContent];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user