content/flux/v0/stdlib/experimental/catch.md
experimental.catch() calls a function and returns any error as a string value.
If the function does not error the returned value is made into a string and returned.
(fn: () => A) => {value: A, msg: string, code: uint}
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
({{< req >}}) Function to call.
import "experimental"
experimental.catch(fn: () => die(msg: "error message"))// Returns "error message"