Package gnue :: Package common :: Package base :: Module errors
[show private | hide private]

Module gnue.common.base.errors

General exception classes.
Exceptions
AdminError This exception class should be used for exceptions indicating a misconfiguration in a widest sense.
ApplicationError This class should be used for errors caused by applications like a corrupt trigger code, or a misformed xml-file and so on.
RemoteError This class is used for transporting an exception raised at a remote point.
SystemError This exception class should be used for exceptions indicating a bug in GNUe.
UserError This class should be used for exceptions where a user did something wrong, or a situation has occured which isn't dramatic, but the user has to be informed of.
Error The same as the builtin python Exception, but can handle messages that are unicode strings.

Function Summary
  get_exception(count, exc_type, exc_value, exc_tback)
Return textual information about an exception.
unicode _unicode(text, encoding)
Convert the given text into unicode using the optionally passed encoding.

Function Details

get_exception(count=None, exc_type=None, exc_value=None, exc_tback=None)

Return textual information about an exception.

This function creates a tuple (group, name, message, detail) for the last exception raised. The optional parameter determines the number of lines skipped from the detail traceback.

The intended use of this function is to get the text to be displayed in error messages.
Parameters:
count - number of lines to skip in the traceback
Returns:
tuple with group, name, message and detail of the last exception.

_unicode(text, encoding=None)

Convert the given text into unicode using the optionally passed encoding. If no encoding is specified the systems' default encoding will be used.
Returns:
the text in unicode
           (type=unicode)


GNUe Home

Private API

Developer's Corner