Files
2014-11-14 16:59:32 -05:00

19 lines
541 B
Python

class VisGraphException(Exception):
pass
class DuplicateNode(VisGraphException):
def __init__(self, node):
Exception.__init__(self, repr(node))
self.node = node
class NodeNonExistant(VisGraphException):
def __init__(self, nodeid):
self.nodeid = nodeid
Exception.__init__(self, 'Node %d does not exist!' % nodeid)
class EdgeNonExistant(VisGraphException):
def __init__(self, edgeid):
self.edgeid = edgeid
Exception.__init__(self, 'Edge %d does not exist!' % edgeid)