HYPERBOLE
Intro
CSS
Concurrency
State
Requests
Data Lists
Forms
Interactivity
Error Handling
OAuth2
Javascript
Advanced
Large Examples
v0.5.0
Exceptions
View Source
Any uncaught exceptions thrown from a handler will be displayed in a bright red box inline in the corresponding HyperView
Cause Exception
Edge Cases
View Source
You can use the same mechanism to exit execution early and display an application error to handle edge cases
We know all these users exist when the view was rendered, so one going missing is unlikely
User: 1
User: 2
User: 3
If a user were deleted between when they were rendered and loaded, the error would look like this:
Attempt to load non-existing User 4
Handling in Views
View Source
Handle any expected errors in your view function, by making it accept a Maybe or Either
Search for a user by id
Custom Error Views
View Source
You can also exit execution early and display a custom view from application code or from caught execptions
Custom Error Message
Custom Error View