feat:fix loading error cannot be thrown
This commit is contained in:
parent
03e5376909
commit
42ae0e245f
@ -59,7 +59,9 @@ public class DoricJSLoaderManager {
|
||||
return jsLoader.request(source);
|
||||
}
|
||||
}
|
||||
return new AsyncResult<>("");
|
||||
AsyncResult<String> ret = new AsyncResult<>();
|
||||
ret.setError(new RuntimeException("Cannot find JS Loader for " + source));
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user