Commit f106ca05 authored by Michel Pelletier's avatar Michel Pelletier

Added new exceptions

parent 72d40b85
class DoesNotImplement(Exception):
""" This object does not implement """
def __init__(self, interface):
self.interface = interface
def __str__(self):
return """An object does not implement interface %(interface)s
""" % self.__dict__
class BrokenImplementation(Exception):
"""An attribute is not completely implemented.
"""
......@@ -13,4 +23,20 @@ class BrokenImplementation(Exception):
The %(name)s attribute was not provided.
""" % self.__dict__
class BrokenMethodImplementation(Exception):
"""An method is not completely implemented.
"""
def __init__(self, method, name):
self.method=method
self.name=name
def __str__(self):
return """An object has failed to implement the method %(method)s
The %(name)s signature attribute is incorrect.
""" % self.__dict__
class InvalidInterface(Exception): pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment