StackExchange.Exceptional icon indicating copy to clipboard operation
StackExchange.Exceptional copied to clipboard

Not logging exceptions from Blazor

Open chrfin opened this issue 2 years ago • 0 comments

I have a Blazor Server-Side app running with .NET 5.0 and I'm trying to switch from ElmahCore to Exceptional.  
But I can't get it to log Blazor exceptions.
When I throw an exception in a MVC controller it gets logged, but if I throw one in e.g. OnAfterRenderAsync nothing gets logged. 

What do I need to configure to get Blazor exceptions logged with Exceptional?

Also in ElmahCore I could use ElmahExtensions.RiseError(exception); to log an exception I catched/handled in code but still wanted to show up in the error-log. Is there something similar for Exceptional?

I configured Exceptional with the default configuration from HERE.

NOTE: This is a cross-post with StackOverflow.

chrfin avatar Aug 06 '21 11:08 chrfin