Error

An Error is a trait of an object that represents a runtime exception, with a name, message, and its stack trace.

if value implements Error do
  print "{value's name}: {value's message}"
  print value's stacktrace

Required Fields

The name of the error.

A short message describing the error.

Default Implementations

A getter that returns the stack trace at the time of exception.

print error's stacktrace
print "hello world"