Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ class BootstrapBlazorErrorBoundary : ErrorBoundaryBase
[NotNull]
private ToastService? ToastService { get; set; }

[Inject]
[NotNull]
private NavigationManager? NavigationManager { get; set; }

/// <summary>
/// 获得/设置 自定义错误处理回调方法
/// </summary>
Expand Down Expand Up @@ -65,7 +69,7 @@ protected override async Task OnErrorAsync(Exception exception)
await ToastService.Error(ToastTitle, exception.Message);
}

Logger.LogError(exception, "{BootstrapBlazorErrorBoundary} {OnErrorAsync} log this error", nameof(BootstrapBlazorErrorBoundary), nameof(OnErrorAsync));
Logger.LogError(exception, "{BootstrapBlazorErrorBoundary} {OnErrorAsync} log this error occurred at {Page}", nameof(BootstrapBlazorErrorBoundary), nameof(OnErrorAsync), NavigationManager.Uri);
}
}

Expand Down