feat:fix loading error cannot be thrown

This commit is contained in:
pengfei.zhou
2020-02-27 17:44:11 +08:00
committed by osborn
parent 03e5376909
commit 42ae0e245f
2 changed files with 9 additions and 1 deletions

View File

@@ -63,6 +63,12 @@ - (void)addJSLoader:(id <DoricLoaderProtocol>)loader {
*stop = YES;
}
}];
if (!ret) {
ret = [DoricAsyncResult new];
[ret setupError:[NSException exceptionWithName:@"LoadingError"
reason:[NSString stringWithFormat:@"Cannot find JS Loader for %@", source]
userInfo:nil]];
}
return ret;
}
@end