Skip to content

Conversation

@TheConstructor
Copy link
Contributor

As long as everything works out as intended StopApplication is called, but if not the Host will probably never stop on it's own.

ICommandLineService cliService,
IConsole console,
IUnhandledExceptionHandler unhandledExceptionHandler)
IUnhandledExceptionHandler unhandledExceptionHandler = null)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary? This service should always be defined, right?

services
.TryAddSingleton<IUnhandledExceptionHandler>(exceptionHandler);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It currently is. Ultimately I hoped that #196 would render the handler optional and I then would have removed the quoted line. Also I wanted to know if you can have optionally injected dependencies and it is consistent with the call in

if (_unhandledExceptionHandler != null)

@natemcmaster natemcmaster merged commit 757ff14 into natemcmaster:master Dec 19, 2018
@natemcmaster
Copy link
Owner

Thanks, Matthias!

@TheConstructor TheConstructor deleted the fix/failsafe-exception-handling branch December 19, 2018 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants