fix: catch JSDisconnectedException and ObjectDisposedException in MarkdownEditor DisposeAsync to prevent noisy circuit disconnect logs
This commit is contained in:
@@ -116,10 +116,18 @@
|
||||
await _module.DisposeAsync();
|
||||
}
|
||||
}
|
||||
catch (JSDisconnectedException)
|
||||
{
|
||||
// Fail silently during circuit disconnection
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
// Fail silently if JS runtime/module is already disposed
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Fail silently during page navigation/webview closures to avoid noisy logs
|
||||
Console.WriteLine($"[MarkdownEditor] Error during JS cleanup: {ex.Message}");
|
||||
// Log other unexpected errors
|
||||
Console.WriteLine($"[MarkdownEditor] Unexpected error during JS cleanup: {ex.Message}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user