diff --git a/injectable/lib/src/get_it_helper.dart b/injectable/lib/src/get_it_helper.dart index 4929fb7..be2f765 100644 --- a/injectable/lib/src/get_it_helper.dart +++ b/injectable/lib/src/get_it_helper.dart @@ -265,8 +265,12 @@ class GetItHelper { getIt.pushNewScope( scopeName: name, init: (getIt) async { - await init(this); - completer.complete(getIt); + try { + await init(this); + completer.complete(getIt); + } catch (e, s) { + completer.completeError(e, s); + } }, dispose: dispose, );