FatalError

The Elm language doesn't have the concept of exceptions or special control flow for errors. It just has Custom Types, and by convention types like Result and the Err variant are used to represent possible failure states and combine together different error states. page

elm-pages doesn't change that, Elm still doesn't have special exception control flow at the language level. It does have a type, which is just a regular old Elm type, called FatalError. Why? Because this plain old Elm type does have one special characteristic - the elm-pages framework knows how to turn it into an error message. This becomes interesting because an elm-pages app has several places that accept a value of type BackendTask FatalError.FatalError value. This design lets the elm-pages framework do some of the work for you.

[…]