mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-07-06 21:33:31 +03:00
Add extra debugging
This commit is contained in:
parent
93ad687307
commit
96dbd0f6bb
|
@ -50,7 +50,10 @@ def _patch_cls(
|
||||||
return
|
return
|
||||||
init_method = getattr(cls, '__init__')
|
init_method = getattr(cls, '__init__')
|
||||||
|
|
||||||
|
try:
|
||||||
injections = _resolve_injections(init_method, container)
|
injections = _resolve_injections(init_method, container)
|
||||||
|
except Exception:
|
||||||
|
raise Exception(cls)
|
||||||
if not injections:
|
if not injections:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -114,7 +117,7 @@ def _prepare_config_injection(
|
||||||
try:
|
try:
|
||||||
provider = provider.as_(parameter.annotation)
|
provider = provider.as_(parameter.annotation)
|
||||||
except Exception:
|
except Exception:
|
||||||
raise Exception(provider, relative_option_name, parameter.annotation)
|
raise Exception(option, parameter, parameter.annotation)
|
||||||
|
|
||||||
return provider
|
return provider
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user