Module edist :: Class LocationsError
[hide private]
[frames] | no frames]

Class LocationsError

              object --+                
                       |                
exceptions.BaseException --+            
                           |            
        exceptions.Exception --+        
                               |        
        exceptions.StandardError --+    
                                   |    
               exceptions.ValueError --+
                                       |
                                      LocationsError

Error object for data parsing error

>>> raise LocationsError
Traceback (most recent call last):
    ...
LocationsError: Invalid location data.
>>> raise LocationsError("distance")
Traceback (most recent call last):
    ...
LocationsError: More than one location is required for distance.
>>> raise LocationsError(data=(4, "52;None"))
Traceback (most recent call last):
    ...
LocationsError: Location parsing failure in location 4 `52;None'.

Since: 0.6.0

Instance Methods [hide private]
 
__init__(self, function=None, data=None)
Initialise a new LocationsError object
str
__str__(self)
Pretty printed error string

Inherited from exceptions.ValueError: __new__

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

Inherited from object: __hash__, __reduce_ex__

Instance Variables [hide private]
  function
Function where error is raised.
Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

Method Details [hide private]

__init__(self, function=None, data=None)
(Constructor)

 
Initialise a new LocationsError object
Parameters:
  • function (str) - Function where error is raised
  • data (tuple) - Location number and data
Overrides: object.__init__

__str__(self)
(Informal representation operator)

 
Pretty printed error string
Returns: str
Human readable error string
Overrides: object.__str__