[Blazor][Fixes #15413] Notify client of errors during initialization (#16636)

This commit is contained in:
Javier Calvarro Nelson 2019-10-30 10:04:30 +01:00 committed by GitHub
parent 405f002f58
commit ebd87a8f20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -122,6 +122,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
// Report errors asynchronously. InitializeAsync is designed not to throw.
Log.InitializationFailed(_logger, ex);
UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(ex, isTerminating: false));
await TryNotifyClientErrorAsync(Client, GetClientErrorMessage(ex), ex);
}
});
}