MudDrawer: Handle JSDisconnectedExceptions thrown when disposed.#4609
MudDrawer: Handle JSDisconnectedExceptions thrown when disposed.#4609diegofrata wants to merge 1 commit intoMudBlazor:devfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #4609 +/- ##
=======================================
Coverage 91.30% 91.30%
=======================================
Files 362 362
Lines 12499 12499
=======================================
Hits 11412 11412
Misses 1087 1087
Continue to review full report at Codecov.
|
|
Thanks for this Really not a fan of |
|
Hi @diegofrata, and thanks for submitting the PR. I guess, the I agree with @mikes-gh regarding the |
|
Oh, I must have missed it. I saw AndForget being used in a few other places and understood it as pattern to be followed. I will refactor it and amend the PR! Thanks for the feedback! |
|
Can we centralise the error trapping in the extension method? I would still advocate |
|
In what way? And extension method that traps JSDisconnectException or throws otherwise? ---- On Fri, 20 May 2022 00:18:08 +0100 ***@***.*** wrote ----
Can we centralise the error trapping in the extension method?
So calling the extension. method is just a best efforts?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
I probably should have been clearer. What I am saying applies. to all our ElementRef extension methods. Trapping I may be wrong and haven't done tests. |
|
The bug this PR fixes has already been fixed by #5562. Thus we are closing this PR. Nevertheless, thank you, all contributions are appreciated! |
Description
Resolves #4608 by ignoring exceptions thrown during Dispose. Also changes the call to Console.WriteLine to Debug.WriteLine as these messages are not desirable in a release build of a production application -- Console.WriteLine mangles log outputs of other components and doesn't allow the user to control the format (e.g. JSON logging)
How Has This Been Tested?
Visually.
Types of changes
Checklist:
dev).