Package gnue :: Package common :: Package apps :: Module errors :: Class gException
[show private | hide private]

Class gException

Exception --+    
            |    
        Error --+
                |
               gException


This class is *DEPRECATED*. Please use gnue.common.base.errors.Error instead.

The same as the builtin python Exception, but can handle messages that are unicode strings. This exception is available as the builtin class "gException". All other user-defined exceptions should be derived from this class.
Method Summary
  __init__(self, message, group)
Unicode getDetail(self, count, type, value, trace)
Return the exception's detail, which is the traceback unless overwritten with detail.
  getGroup(self)
Return the group of the exception.
Unicode getMessage(self)
Return the message of an exception.
Unicode getName(self, aType)
Return the exception's name, which is the classname of the exception class unless overwritten with name.
    Inherited from Exception
  __getitem__(...)
  __str__(...)

Instance Variable Summary
  detail: The detail information to the exception.
  group: The group or category of the exception.
Unicode message: The error message.
  name: The name of the exception.

Method Details

__init__(self, message, group='system')
(Constructor)

Overrides:
gnue.common.base.errors.Error.__init__

getDetail(self, count=None, type=None, value=None, trace=None)

Return the exception's detail, which is the traceback unless overwritten with detail.

Optionally, a number of lines can be skipped at the beginning of the traceback (if the detail is the traceback).
Parameters:
count - Number of lines to skip at the beginning of the traceback.
Returns:
Detail information for the exception.
           (type=Unicode)

getGroup(self)

Return the group of the exception.
Returns:
Group of the exception, one of 'system', 'admin', 'application', or 'user'.

getMessage(self)

Return the message of an exception.
Returns:
Message of the exception.
           (type=Unicode)

getName(self, aType=None)

Return the exception's name, which is the classname of the exception class unless overwritten with name.
Returns:
Name of the exception.
           (type=Unicode)

Instance Variable Details

detail

The detail information to the exception. If set, this will be returned by getDetail and getException instead of the traceback.

group

The group or category of the exception. Can be one of 'system', 'admin', 'application', or 'user'.

message

The error message.
Type:
Unicode

name

The name of the exception. If set, this will be returned by getName and getException instead of the class name of the exception.


GNUe Home

Public API

Developer's Corner