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
If _exceptionHandler is null, exceptions caught here are swallowed. This isn't intuitive. I would assume that if I don't supply an _exceptionHandler, all exceptions would not be handled (or swallowed). @danipen has confirmed that the current behavior is not correct.
Important
The one exception to the rule is event handlers - by design, per Microsoft, event handlers should never throw exceptions.
There are classes that take an
Action<Exception> exceptionHandleras a param to the ctor. A value ofnullis acceptable and valid.Example:
Here is an example of a non-event handler callsite:
GenericLineTransformer:ColorizeLine
If
_exceptionHandleris null, exceptions caught here are swallowed. This isn't intuitive. I would assume that if I don't supply an_exceptionHandler, all exceptions would not be handled (or swallowed). @danipen has confirmed that the current behavior is not correct.Important
The one exception to the rule is event handlers - by design, per Microsoft, event handlers should never throw exceptions.