Biskit :: ErrorHandler :: ErrorHandler :: Class ErrorHandler
[hide private]
[frames] | no frames]

Class ErrorHandler

source code


Default Error Handler for Biskit classes.

Instance Methods [hide private]
  __init__(self, log=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  fatal(self, message)
Handle a fatal error (likely a bug), stop program execution.
  error(self, message)
Handle a normal error (like non-existing file) that is not necessarily a bug.
  warning(self, message, error=1, trace=0)
Issue a warning.

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, log=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Parameters:
  • log (LogFile) - target of error messages, None->StdErr (default: None)
Overrides: object.__init__

fatal(self, message)

source code 

Handle a fatal error (likely a bug), stop program execution.
Parameters:
  • message (str) - message to be given to user
Raises:

error(self, message)

source code 

Handle a normal error (like non-existing file) that is not necessarily a bug.
Parameters:
  • message (str) - message to be given to user
Raises:

warning(self, message, error=1, trace=0)

source code 

Issue a warning. No exception is raised.
Parameters:
  • message (str) - message to be given to user
  • error (1||0) - report Exception with line (default: 1)
  • trace (1||0) - report full back trace to exception (default: 0)