Skip to content

Instantly share code, notes, and snippets.

View amarodeabreu's full-sized avatar

newInstanceOfObject() amarodeabreu

View GitHub Profile
@SteveSandersonMS
SteveSandersonMS / blazor-error-handling.md
Last active April 10, 2024 13:26
Error handling in Server-Side Blazor

Error handling in Server-Side Blazor

Developers building Blazor applications should be aware of how the framework deals with exceptions, and what steps to take in order to maximize reliability and to detect and diagnose errors.

To recap, server-side Blazor is a stateful framework. For as long as users are interacting with your application, they maintain a connection to the server known as a circuit. The circuit holds all the active component instances, plus many other aspects of state such as the components' most recent render output and the current set of event-handling delegates that could be triggered by client-side events. If a user opens your application in multiple browser tabs, then they have multiple independent circuits.

As a high-level principle, Blazor treats most unhandled exceptions as fatal to that circuit. If a circuit is terminated due to an unhandled exception, the user can only continue by reloading the page to create a new circuit and starting again, although other circuits (e.g., th

tell application "Microsoft Outlook"
set theMessage to first item of (get current messages)
set theSubject to the subject of theMessage
set theBody to the plain text content of theMessage
set theID to the id of theMessage
end tell
tell application "Things3"
show quick entry panel with properties {name:theSubject, notes:theBody}
end tell