Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

Panic_Provider

Panic_Provider

Panic_Provider -- abstract panic
panic with the given message

NYI: The result of do_panic should be returned by `use`, but there is
currently no way we could do this. One way would be to add a local
variable of type `Any` to `panic` and store the result there and then
cast it to the correct type in `use` (see
https://flang.dev/design/type_casts_ref)
Install this panic provider using a new instance of panic an run
`code` on it. In case of an abort, return `def()` (NYI: def should be
removed and the result of do_panic should be returned instead).