I am evaluating upgrading to MvvmCross v5.4 and I am getting an unhandled exception when calling Close on the MvxNavigationService. Unfortunately I am getting no further information on the exception.
I know if I add a handler for the BeforeClose or AfterClose events these get called, however after this, the exception occurs. It also occurs if I do not handle these events.
The view I am trying to close is an MvxDialogFragment. I am calling from within the MvxDiaglogFragments view model, so it is trying to close itself.
I am calling close as shown below
public IMvxAsyncCommand CancelCommand => new MvxAsyncCommand(async () =>
{
try
{
await navigationService.Close(this);
}
catch (Exception ex)
{
logger.Error("An error occurred [{0}] [{1}]",
ex.Message,
ex.StackTrace);
}
});
The catch does not catch the exception.
Any ideas?
Update this is the last line in the output window in Visual Studio 2017
11-14 17:09:13.526 D/Mono ( 8414): Assembly Ref addref MvvmCross.Binding[0xabc16b00] -> System.Reflection.Extensions[0xabc17dc0]: 5 An unhandled exception occured.