You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really like having DI in my code it makes it very readable and testable!
My Problem:
If my configuration settings are wrong, the constructor throws an exception stating which value is missing. This exception is swalloed and the program terminates with errorcode 3.
I think this happens due to the fact that injector's create method marked as noexcept. When instantiating a dependency throws, the exception isn't caught inside the create, thus terminating the application, because the noexcept 'contract' is breached.
I'm wondering though, about the rationale of making it noexcept?
Hi,
I really like having DI in my code it makes it very readable and testable!
My Problem:
If my configuration settings are wrong, the constructor throws an exception stating which value is missing. This exception is swalloed and the program terminates with errorcode 3.
Example ctor
Result on console: I see the first message and then program terminates.
System:
The text was updated successfully, but these errors were encountered: