Skip to content

Commit b78d260

Browse files
fix: #64 call to parent OnErrorAsync in RaygunErrorBoundary (#65)
1 parent 6607672 commit b78d260

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/Raygun.Blazor.Maui/Control/RaygunErrorBoundary.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public class RaygunErrorBoundary : ErrorBoundary
4949
/// <returns></returns>
5050
protected override async Task OnErrorAsync(Exception exception)
5151
{
52-
Console.WriteLine("OnErrorAsync");
52+
// Always call to parent OnErrorAsync to log the error with default logger.
53+
await base.OnErrorAsync(exception);
54+
5355
if (!RaygunSettings.Value.CatchUnhandledExceptions) return;
5456

5557
await RaygunClient.RecordExceptionAsync(exception, null, ["UnhandledException", "Blazor", ".NET"]);

src/Raygun.Blazor.Server/Controls/RaygunErrorBoundary.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public class RaygunErrorBoundary : ErrorBoundary
4949
/// <returns></returns>
5050
protected override async Task OnErrorAsync(Exception exception)
5151
{
52+
// Always call to parent OnErrorAsync to log the error with default logger.
53+
await base.OnErrorAsync(exception);
54+
5255
if (!RaygunSettings.Value.CatchUnhandledExceptions) return;
5356

5457
await RaygunClient.RecordExceptionAsync(exception, null, ["UnhandledException", "Blazor", ".NET"]);

src/Raygun.Blazor.WebAssembly/Controls/RaygunErrorBoundary.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public class RaygunErrorBoundary : ErrorBoundary
5656
/// <returns></returns>
5757
protected override async Task OnErrorAsync(Exception exception)
5858
{
59+
// Always call to parent OnErrorAsync to log the error with default logger.
60+
await base.OnErrorAsync(exception);
61+
5962
if (!RaygunSettings.Value.CatchUnhandledExceptions) return;
6063

6164
await RaygunClient.RecordExceptionAsync(exception, null, ["UnhandledException", "Blazor", ".NET"]);

0 commit comments

Comments
 (0)