This class provides the logging and handling behaviour (toast notification) for all unhandled exceptions that reach a "top level" entry point (e.g. UI or API Event callback function)
We should use this for all API events (like OnDocumentChange) and is used in the Bridge for Bindings.
If any exception reaches this high, we consider this an unexpected error, and will be logged as such.
Exception handling should be performed lower down if the error is recoverable or expected.
Cleaned up a couple things in the Bindings, most notably r.e. thread safety
TODO:
[x] Test some of the async Action Block changes in CEF 65 (Revit 2021) <- not easy, agreed with Dim that we can do this later
[x] Unwrap target invocation of sync binding calls (atleast for the execute method return) <- I've done it slightly differently, I'm re-wrapping with a better message
[x] Do one last test in all connectors, injecting some exceptions in a few places...
[x] Double check logs appear in sync with structured params
[x] Check that we aren't somehow changing threads for the async overloads of the toplevel catch <- impossible for no async stuff, we don't do any async
Important changes
TopLevelExceptionHandler
service.OnDocumentChange
) and is used in the Bridge for Bindings.TODO:
Test some of the async Action Block changes in CEF 65 (Revit 2021)<- not easy, agreed with Dim that we can do this laterFigure out the best practice for logging (https://spockle.atlassian.net/browse/DUI3-389ILogger<T>
orILoggerFactory
)Ask Ian about circular depsUnwrap target invocation of sync binding calls (atleast for the execute method return)<- I've done it slightly differently, I'm re-wrapping with a better messageDo one last test in all connectors, injecting some exceptions in a few places...Double check logs appear in sync with structured paramsCheck that we aren't somehow changing threads for the async overloads of the toplevel catch<- impossible for no async stuff, we don't do any async