index Zimbu documentation

MODULE E @public

summary

     

Classes, Interfaces and methods for Exceptions

Class hierarchy:

 E.Exception
   E.Exit                EXIT encountered
   E.Interrupt           user interrupt or signal received
   E.TimeOut             timer expired
   E.Error
     E.OutOfMemory       ran out of RAM
     E.NilAccess         dereferencing object that is NIL
     E.MemoryAccess      accessing memory that doesn't exist (SEGV signal)
     E.Init              Initialization failed
     E.Check             CHECK.name() failed
     E.Unsupported       feature not implemented
     E.BadValue
       E.OutOfRange      list or array index out of range
       E.KeyNotFound     dict access with non-existing key
       E.ItemNotFound    container searched for non-existing item
       E.KeyExists       adding to dict with key that already exists
       E.IllegalByte     not in utf-8 encoding
     E.Arithmetic
       E.DivideByZero    x / 0
       E.Overflow        x * y
     E.IOError
       E.FileNotFound    when opening file or directory
       E.AccessDenied    when opening or reading file
       E.Pipe            reading from or writing to pipe that's not open
     E.Dyn               dyn type used badly
     E.WrongType         typecast failed
     E.Thread            when operating on a thread
     E.Internal          bad Zimbu!

CLASS  Exception @public  The base class for all exceptions.
CLASS  Exit @public  Exception thrown by EXIT.
CLASS  Interrupt @public  Exception thrown by a user interrupt: CTRL-C pressed or signal SIGHUP or SIGINT received.
CLASS  TimeOut @public  Exception thrown when a timer expires.
CLASS  Error @public  Base class for exceptions that are an error.
CLASS  OutOfMemory @public  Exception thrown when out of memory.
CLASS  NilAccess @public  Exception thrown when dereferencing a NIL.
CLASS  MemoryAccess @public  Exception thrown when accessing memory that cannot be accessed.
CLASS  Init @public  Exception thrown when initialization failed.
CLASS  Check @public  Exception thrown by a method in the CHECK module.
CLASS  Unsupported @public  Exception thrown when code is not implemented.
CLASS  BadValue @public  Class of exceptions that are thrown when a value is unacceptable.
CLASS  OutOfRange @public  Exception thrown when an index is out of range: idx < 0 idx >= Size()
CLASS  KeyNotFound @public  Exception thrown when making a dict loopup for a key that does not exist.
CLASS  ItemNotFound @public  Exception thrown when searching for an item in a container that does not exist.
CLASS  KeyExists @public  Exception thrown when adding an item to a dict for a key that already exist.
CLASS  IllegalByte @public  Exception thrown when encountering an illegal byte in a UTF-8 string.
CLASS  Arithmetic @public  Exception thrown for a non-specific Arithmetic error
CLASS  DivideByZero @public  Exception thrown when dividing by zero.
CLASS  Overflow @public  Exception thrown for a value overflow.
CLASS  IOError @public  Exception thrown for a non-specific I/O error
CLASS  FileNotFound @public  Exception thrown when a file cannot be opened because it, or its directory, cannot be found.
CLASS  AccessDenied @public  Exception thrown when a file cannot be opened for the current user and the requested operation.
CLASS  Pipe @public  Exception thrown when writing to or reading from a pipe that is not open.
CLASS  Dyn @public  Exception thrown when using a dyn type.
CLASS  WrongType @public  Exception thrown when a type is used where another type is expected and automatic conversion is not possible.
CLASS  Thread @public  Exception thrown when an operation on a thread fails.
CLASS  Internal @public  Exception thrown when running into an internal error. Sorry!
 
unhandledException(e) @file 
reportStack(writer) @public  Write the current stack backtrace to writer.
 

members (alphabetically)

     

PROC reportStack(IO.I_Writer writer) @public

     

Write the current stack backtrace to writer.

PROC unhandledException(E.Exception e) @file

     

When an exception is thrown while in here do not call beforeExit() again. Otherwise a SEGV in beforeExit() will loop forever.

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