-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConductorBaseWithActiveItem swallows exceptions in ActivateItemAsync #863
Comments
I have the same issue on Caliburn.Micro v4.0.212. @nkreipke Have you managed to find a workaround to catch unhandled exceptions thrown in |
We had to reimplement the |
@vb2ae I have an application for internal usage that doesn't require user-friendly exception handling - the app would just crash on Caliburn v3 - it's fine for me. For example it fetches data from my SQL database within It would be nice to have the possibility to globally catch these exceptions thrown within Maybe a global exception handler could be provided? Something like the |
Exceptions thrown in
ActivateItemAsync
, including all other methods called from the default implementation (TryDeactivateAsync
,TryActivateAsync
,NotifyOfPropertyChange
,OnActivationProcessed
) are silently discarded.Repro:
When selecting an item in a WPF ListBox, nothing happens. This is especially bad if there is additional code after the exception, which is simply not being executed without any indication.
I've found a similar issue #745 which is probably related.
The reason is that the setter of
ActiveItem
callsActivateItemAsync
without awaiting the task. This is a regression from 3.x. I realize awaiting in a setter is not possible and this might be a design issue:Caliburn.Micro/src/Caliburn.Micro.Core/ConductorBaseWithActiveItem.cs
Line 20 in 145c480
The text was updated successfully, but these errors were encountered: