Package gavo :: Package utils :: Module excs :: Class StructureError
[frames] | no frames]

Class StructureError

source code

              object --+            
                       |            
exceptions.BaseException --+        
                           |        
        exceptions.Exception --+    
                               |    
                           Error --+
                                   |
                                  StructureError
Known Subclasses:

is raised if an error occurs during the construction of structures.

You can construct these with pos; this is an opaque object that, when stringified, should expand to something that gives the user a rough idea of where something went wrong.

Since you will usually not know where you are in the source document when you want to raise a StructureError, xmlstruct will try to fill pos in when it's still None when it sees a StructureError. Thus, you're probably well advised to leave it blank.

Instance Methods
 
__init__(self, msg, pos=None, hint=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code
 
addPos(self, baseMsg) 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

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

Method Details

__init__(self, msg, pos=None, hint=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)