Error

Error prototype extensions

Import

_ <- fat.type.Error

Aliases

  • KeyError
  • IndexError
  • CallError
  • TypeError
  • AssignError
  • ValueError

Constructor

Name Signature Brief
Error (val: Any) Return val coerced to text wrapped in error

Prototype members

Name Signature Brief
isEmpty (): Boolean Return true, always
nonEmpty (): Boolean Return false, always
size (): Number Return 0, always
toText (): Text Return error text val

Example

_ <- fat.type.Error
x = Error('ops')
x.toText  # yields "Error: ops"

# ...or something unexpected
e = undeclared.item  # raises Error
e.toText             # yields "can't resolve scope of 'item'"

See also

results matching ""

    No results matching ""