up: E     index Zimbu documentation

CLASS E.Exception @public

summary

     

The base class for all exceptions.

It's very unusual to catch this, you should probably catch a subclass:

    E.Exit           EXIT encountered
    E.Interrupt      User pressed CTRL-C, SIGINT or SIGHUP
    E.Error          Runtime error

NEW(msg) @public  Create a new generic exception using the position of the caller.
NEW(pos, msg) @public  Create a new generic exception with position pos.
$ToString() string @public  Return a string representation of the exception.
$writeTo(w) @public  Write a string representation of the exception to w.
$toString(verbose) string @public  Return a string representation of the exception.
$writeTo(verbose, w) @public  Return a string representation of the exception.
$getMessage() string @public  Return the message of the Exception.
$getPos() Z.Pos @public  Return the position where the Exception was thrown.
$getBacktrace() list<Z.Pos> @public  Return the stack trace of where the Exception was thrown.
 
Known subclasses:
     
 

members (alphabetically)

     

PROC NEW(string msg) @default @public

     

Create a new generic exception using the position of the caller.

PROC NEW(Z.Pos pos, string msg) @public

     

Create a new generic exception with position pos.

FUNC $ToString() string @default @public

     

Return a string representation of the exception.

This includes the position, does not include a stack trace.

FUNC $getBacktrace() list<Z.Pos> @public

     

Return the stack trace of where the Exception was thrown.

FUNC $getMessage() string @public

     

Return the message of the Exception.

FUNC $getPos() Z.Pos @public

     

Return the position where the Exception was thrown.

FUNC $toString(bool verbose) string @default @public

     

Return a string representation of the exception.

When verbose is FALSE this is the same as ToString(). When verbose is TRUE the stack trace is included.

PROC $writeTo(IO.I_Writer w) @default @public

     

Write a string representation of the exception to w.

This includes the position, does not include a stack trace.

PROC $writeTo(bool verbose, IO.I_Writer w) @default @public

     

Return a string representation of the exception.

When verbose is FALSE this is the same as ToString(). When verbose is TRUE the stack trace is inclued.

license

      Copyright 2011 Bram Moolenaar All Rights Reserved.

      Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0