Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
210CT-Coursework/GraphExceptions.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
11 lines (9 sloc)
356 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NoGraph(Exception): | |
def __init__(self): | |
super().__init__("Graph can not be 'None'") | |
class NotInGraph(Exception): | |
def __init__(self, item): | |
super().__init__(item + " not in graph") | |
class NoPath(Exception): | |
def __init__(self, pointA, pointB): | |
super().__init__("No path exists between " + pointA + " and " + pointB) |