MudBlazor icon indicating copy to clipboard operation
MudBlazor copied to clipboard

MudBlazor template is missing unhandled exceptions div

Open d00lar opened this issue 9 months ago • 6 comments

Bug type

Component, Other

Component name

MainLayout

What happened?

in default MudBlazor serwerside template in routes.razor / old index.html

You guys are missing

<div id="blazor-error-ui"> <span style="color:black">An unhandled error has occurred.</span> <a href="" class="reload">Reload</a> <a class="dismiss">🗙</a> </div>

without this when there is an unhandled expeption

for example if in famus 'counter' component page we change from

private void IncrementCount()
{
    currentCount++;
}

to

private async Task IncrementCount()
{
      currentCount++;
      throw new Exception("test");
}

then onclick there is no exception throwed in VS and app just freeze.

BE AWARE IN TRY MUDBLAZOR LINK everything is ok in default New Project / MudBlazor template NO.

Expected behavior

in defualt template error handling 'down bar' should be also implemented

Reproduction link

https://try.mudblazor.com/snippet/mEGIaTGkGgKtdJXD https://stackoverflow.com/questions/78493661/blazor-serverside-why-is-exception-not-thrown-when-in-task-how-to-avoid-this

Reproduction steps

  1. new serverside project from mudblazor templates
  2. change counter page code to as i wrote above
  3. vlick on counter btn. ...

Relevant log output

No response

Version (bug)

6.19

Version (working)

No response

What browsers are you seeing the problem on?

Chrome

On which operating systems are you experiencing the issue?

Windows

Pull Request

  • [ ] I would like to do a Pull Request

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

d00lar avatar May 20 '24 07:05 d00lar