fabulous-dev / Fabulous

Declarative UI framework for cross-platform mobile & desktop apps, using MVU and F# functional programming
https://fabulous.dev
Apache License 2.0
1.13k stars 122 forks source link

Add OnException handler on Program #935

Closed TimLariviere closed 2 years ago

TimLariviere commented 2 years ago

Enables to retrieve potential exceptions thrown during the MVU loop via

Program.statefulApplication init update view
|> Program.withExceptionHandler (fun ex ->
    printfn "%0A" ex
)

By default, all exceptions are sent to the Trace logger