feat(injector): change injector to show the full path when error happens in a constructor (async)
This commit is contained in:
@ -8,7 +8,15 @@ class FutureWrapper {
|
||||
return new Future.value(obj);
|
||||
}
|
||||
|
||||
static Future error(obj) {
|
||||
return new Future.error(obj);
|
||||
}
|
||||
|
||||
static Future wait(List<Future> futures){
|
||||
return Future.wait(futures);
|
||||
}
|
||||
|
||||
static Future catchError(Future future, Function onError){
|
||||
return future.catchError(onError);
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,16 @@ export class FutureWrapper {
|
||||
return Future.resolve(obj);
|
||||
}
|
||||
|
||||
static error(obj):Future {
|
||||
return Future.reject(obj);
|
||||
}
|
||||
|
||||
static wait(futures):Future {
|
||||
if (futures.length == 0) return Future.resolve([]);
|
||||
return Future.all(futures);
|
||||
}
|
||||
|
||||
static catchError(future:Future, onError:Function):Future {
|
||||
return future.catch(onError);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user