Class Exception

Summary

The Exception provides the basics. It can be subclassed to provide different types of exceptions.

Superclasses:
Object

Package:
exception
File:
exception.icn
Methods:
getLocation, getMessage, getStackTrace, show, throw

Methods inherited from Object:
Type, className, clone, equals, fieldNames, genMethods, getField, get_class, get_class_name, get_id, hasField, hasMethod, hash_code, instanceOf, invoke, is_instance, setField, to_string

Fields:
location, message

Source code.

Details
Constructor

Exception(aMessage)

Create an exception. Although you can attach a message at this point, it's more common to attach the message when calling the throw method.

default message to attach to this exception.

Methods:

getLocation()

Returns:
a stack trace (as a string) from the point of Exception


getMessage()

Returns:
the message attached to this exception

Typically, this is the only method overridden by subclasses.


getStackTrace()

Returns:
a stack trace (as a list) from the point of Exception


show(outFile)

Display the exception, showing the message and the stacktrace. <[ram outFile -- output stream (defaults to &errout)


throw(aMessage)

Throw the Exception with an attached message.

message to attach to this exception throw


Fields:
location

message


This page produced by UniDoc on 2021/04/15 @ 23:59:53.