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. The failure is handled by LIGO's testing framework and not by Michelson's interpreter.

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"]. The failure is handled by LIGO's testing framework and not by Michelson's interpreter.

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"]. The failure is handled by LIGO's testing framework and not by Michelson's interpreter.