Skip to content

Using Custom ILogger with ErrorBoundary produces exception = null #39039

@musamalou

Description

@musamalou

I have a blazor webassembly project with a custom ILogger that worked fine. However, after I used the new ErrorBoundary, the public void Log method of the ILogger is called with logLever = Error and a null exception.

 <ErrorBoundary @ref ="errorBoundary">
        <ChildContent>
            @Body
        </ChildContent>
        <ErrorContent Context="ex">  
             <div class="alert alert-danger alert-dismissible fade show m-3" role="alert" style="display:flex; z-index:99999;">
                 <div style="justify-content:flex-start;flex:10;"> <strong>Error:</strong>@ex.Message  </div>
                 <div style="justify-content:flex-end;flex:1"><a href="@CurrentPath" class="reload"  style="float:right;cursor:pointer;" >Reload <span class="material-icons" title="refresh"> refresh </span> </a> </div>                        
            </div>           
        </ErrorContent>
    </ErrorBoundary>

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-blazor-error-boundary

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions