home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.4)
-
- '''Interface-specific exceptions
-
- $Id: exceptions.py 27082 2004-08-12 20:03:58Z srichter $
- '''
-
- class Invalid(Exception):
- '''An specification is violated
- '''
- pass
-
-
- class DoesNotImplement(Invalid):
- ''' This object does not implement '''
-
- def __init__(self, interface):
- self.interface = interface
-
-
- def __str__(self):
- return 'An object does not implement interface %(interface)s\n\n ' % self.__dict__
-
-
-
- class BrokenImplementation(Invalid):
- '''An attribute is not completely implemented.
- '''
-
- def __init__(self, interface, name):
- self.interface = interface
- self.name = name
-
-
- def __str__(self):
- return 'An object has failed to implement interface %(interface)s\n\n The %(name)s attribute was not provided.\n ' % self.__dict__
-
-
-
- class BrokenMethodImplementation(Invalid):
- '''An method is not completely implemented.
- '''
-
- def __init__(self, method, mess):
- self.method = method
- self.mess = mess
-
-
- def __str__(self):
- return 'The implementation of %(method)s violates its contract\n because %(mess)s.\n ' % self.__dict__
-
-
-
- class InvalidInterface(Exception):
- '''The interface has invalid contents
- '''
- pass
-
-
- class BadImplements(TypeError):
- """An implementation assertion is invalid
-
- because it doesn't contain an interface or a sequence of valid
- implementation assertions.
- """
- pass
-
-