envzn
0.8 · beta · not released

Library / Errors / Errors / Error

CLASS

Error

Abstract base class for the kernel error hierarchy.

Fields 2

int32 code
int32 line_number

Constructors 5

INIT()
INIT(char32[] message)
INIT(REFERENCE String message)

Bridge from a String arg — copy the source's code points into this .msg. The per-subclass INIT(String message) pattern uses SUPER(message) which routes here.

INIT(REFERENCE String message, REFERENCE String cause)

Chaining INIT — set both the message and the triggering error's message as the cause. Errors are chained by passing a triggering error's message as the cause of a new one (I.M.ii). A subclass that wants to expose chaining declares its own INIT(String, String) and routes here with SUPER(message, cause).

INIT(REFERENCE String message, REFERENCE String cause, int32 code)

Chaining INIT with an explicit numeric code.

Methods 6

METHOD hasCause() RETURNS boolean
reads

Whether a triggering cause is attached (I.M.ii).

METHOD getErrorCode() RETURNS int32
reads

The numeric error code; 0 means "no code" (I.M.ii).

METHOD message() RETURNS String
reads

What went wrong, as the PANIC site's INIT set it.

METHOD cause() RETURNS String
reads

The triggering error's message, or empty when there is none (I.M.ii).

METHOD filename() RETURNS String
reads

The source file of the PANIC site, injected by the compiler.

METHOD threadName() RETURNS String
reads

The raising thread's name, or empty for an unnamed context.