Пример #1
0
    def __init__(self, message, api_object=None):
        """ 
        Create a new exception object.

        :param message: The exception message.
        :param object:  The object that has caused the exception, default is
                        None.
        """
        sue.ExceptionBase.__init__(self, message)

        self._type = self.__class__.__name__
        self._message = message
        self._messages = [self.get_message()]
        self._exceptions = [self]
        self._top_exception = self
        self._traceback = sue.get_traceback(1)

        if api_object:
            self._object = weakref.ref(api_object)
        else:
            self._object = None
Пример #2
0
 def trace () :
     logger.debug (get_traceback (0))