Skip to main content
Version: Next

error

assert: (condition: bool, error: string) => unit

The call assert(cond, error) terminates the execution with the string error (that is, an error message) if, and only if, the boolean condition cond is false.

some: <a>(_: option<a>, error: string) => unit

The call some(opt, err) terminates the execution with the string err (that is, an error message) if, and only if, opt is ["None" as "None"].

none: <a>(_: option<a>, error: string) => unit

The call none(opt, err) terminates the execution with the string err (that is, an error message) if, and only if, opt is an optional value different from ["None" as "None"].