Skip to documentation
SplitScript
  • Language
  • Standard library
  • Guides
  • Migration

SplitScript reference / Language / Err

Err

syntax

Err(message)

Constructs a T! error.

Err takes a String and obtains its successful T type from surrounding T! context.

Examples

Construct an error

let health: i32! = Err("health is unavailable")
Generated from the SplitScript compiler's documentation catalogs.