Skip to content

Commit a8e0bed

Browse files
authored
Include the exception when logging in WebAssemblyErrorBoundaryLogger (#39202)
Fixes #39039
1 parent 462e46e commit a8e0bed

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Components/WebAssembly/WebAssembly/src/Services/WebAssemblyErrorBoundaryLogger.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using System.Threading.Tasks;
64
using Microsoft.AspNetCore.Components.Web;
75
using Microsoft.Extensions.Logging;
86

97
namespace Microsoft.AspNetCore.Components.WebAssembly.Services;
108

11-
internal class WebAssemblyErrorBoundaryLogger : IErrorBoundaryLogger
9+
internal sealed class WebAssemblyErrorBoundaryLogger : IErrorBoundaryLogger
1210
{
1311
private readonly ILogger<ErrorBoundary> _errorBoundaryLogger;
1412

@@ -21,7 +19,7 @@ public ValueTask LogErrorAsync(Exception exception)
2119
{
2220
// For, client-side code, all internal state is visible to the end user. We can just
2321
// log directly to the console.
24-
_errorBoundaryLogger.LogError(exception.ToString());
22+
_errorBoundaryLogger.LogError(exception.ToString(), exception);
2523
return ValueTask.CompletedTask;
2624
}
2725
}

0 commit comments

Comments
 (0)