diff --git a/injectable/lib/src/get_it_helper.dart b/injectable/lib/src/get_it_helper.dart index 6172127..fce4855 100644 --- a/injectable/lib/src/get_it_helper.dart +++ b/injectable/lib/src/get_it_helper.dart @@ -264,8 +264,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, );