--- title: die() function description: > `die()` stops the Flux script execution and returns an error message. menu: flux_v0_ref: name: die parent: universe identifier: universe/die weight: 101 introduced: 0.82.0 --- `die()` stops the Flux script execution and returns an error message. ##### Function type signature ```js (msg: string) => A ``` {{% caption %}} For more information, see [Function type signatures](/flux/v0/function-type-signatures/). {{% /caption %}} ## Parameters ### msg ({{< req >}}) Error message to return. ## Examples ### Force a script to exit with an error message ```js die(msg: "This is an error message") ```