Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

error_type

form an error type from a type

Synopsis

error_type(t: type) -> type

Description

The error_type function returns the error type whose values have type t, e.g., error_type(<string>) is <error(string)>.

Examples


Form an error type

# spq
values error_type(this)
# input
<{msg:string}>
# expected output
<error({msg:string})>