Skip to content

Commit e39af56

Browse files
committed
refactor: 增加自定义异常处理逻辑优先处理
1 parent 97d863c commit e39af56

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/BootstrapBlazor/Components/ErrorLogger/BootstrapBlazorErrorBoundary.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ private MarkupString GetErrorContentMarkupString(Exception ex)
124124
/// <param name="handler"></param>
125125
public async Task RenderException(Exception exception, IHandlerException? handler)
126126
{
127+
// 外部调用
128+
if (OnErrorHandleAsync != null)
129+
{
130+
await OnErrorHandleAsync(Logger, exception);
131+
return;
132+
}
133+
127134
if (handler != null)
128135
{
129136
await handler.HandlerException(exception, ExceptionContent);

0 commit comments

Comments
 (0)