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
// A view-model constructor (or one of its DI dependencies) throwing
433
+
// here is app code failing, not a missing registration — don't fall
434
+
// through to the reflection path, which would run the same failing
435
+
// constructor again. Log before the fault propagates: no caller up
436
+
// the navigation chain logs it, and at startup the faulted task is
437
+
// typically unobserved, so this is the only diagnostic the app
438
+
// author ever gets (see #3136).
439
+
if(Logger.IsEnabled(LogLevel.Error))Logger.LogErrorMessage(ex,$"Failed to create view model '{mapping!.ViewModel.Name}': the service provider threw while constructing it");
if(Logger.IsEnabled(LogLevel.Information))Logger.LogInformationMessage("ViewModel not included in RouteMap, and unable to instance using Activator instead of ServiceProvider");
458
+
if(Logger.IsEnabled(LogLevel.Error))Logger.LogErrorMessage(ex,$"Failed to create view model '{mapping.ViewModel.Name}' via the reflection fallback (type isn't registered with the service provider)");
0 commit comments