|
Package gnue ::
Package common ::
Package base ::
Module errors ::
Class Error
|
| [show private | hide private] |
|
Class Error
Exception --+
|
Error
- Known Subclasses:
-
AdminError,
ApplicationError,
SystemError,
UserError
The same as the builtin python Exception, but can handle messages that
are unicode strings. All other user-defined exceptions should be derived
from this class.
| Method Summary |
| |
__init__(self,
message,
group)
|
| Unicode
|
get_detail(self,
count,
etype,
evalue,
etrace)
Return the exception's detail, which is the traceback unless
overwritten with detail. |
| Unicode
|
get_name(self,
exc_type)
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. |
get_detail(self,
count=None,
etype=None,
evalue=None,
etrace=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)
|
get_name(self,
exc_type=None)
Return the exception's name, which is the classname of the exception
class unless overwritten with name.
-
- Parameters:
exc_type -
Type of the exception class to be used if no name is defined
and the exception being handled is no longer available in
sys.exc_info()
- Returns:
-
Name of the exception.
(type=Unicode)
|
| Instance Variable Details |
detail
The detail information to the exception. If set, this will be returned
by get_detail and get_exception
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 get_name and get_exception
instead of the class name of the exception.
|