grizzled :: exception :: ExceptionWithMessage :: Class ExceptionWithMessage
[hide private]
[frames] | no frames]

Class ExceptionWithMessage

source code

              object --+        
                       |        
exceptions.BaseException --+    
                           |    
        exceptions.Exception --+
                               |
                              ExceptionWithMessage
Known Subclasses:

Useful base class for exceptions that have a single exception message argument. Among other things, this method provides a reasonable default __str__() method.

Usage:

from grizzled.exception import ExceptionWithMessage

class MyException(ExceptionWithMessage):
    def __init__(self, msg):
        ExceptionWithMessage.__init__(self, msg)
Instance Methods [hide private]
 
__init__(self, errorMessage)
Create a new exception.
source code
 
__str__(self)
str(x)
source code

Inherited from exceptions.Exception: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]
  message
The message stored with this object.

Inherited from exceptions.BaseException: args

Inherited from object: __class__

Method Details [hide private]

__init__(self, errorMessage)
(Constructor)

source code 

Create a new exception.

@type errorMessage: string @param errorMessage: the error message

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

Property Details [hide private]

message

The message stored with this object.
Get Method:
unreachable.message(self) - The message stored with this object.