Script to grab stop codes from allstops.xml and sort
[ottawa-travel-planner.git] / PlannerExceptions.py
blobe249286e6a6fad124e62bb05fcc8a480448748f8
2 # vi: set softtabstop=4 shiftwidth=4 tabstop=8 expandtab:
4 """usage: from PlannerExceptions import *"""
6 class TravelPlannerException(Exception):
7 """Generic parent exception for anything thrown by us, as opposed to
8 things thrown by the network layer."""
10 def __init__(self, value):
11 Exception.__init__(self, value)
13 class InvalidLandmarkException(TravelPlannerException):
14 """Thrown when a source or destination landmark can't be found."""
16 def __init__(self, value):
17 TravelPlannerException.__init__(self, value)
19 class ItineraryParseException(TravelPlannerException):
20 """Thrown when the itinerary returned by the travel planner can't be
21 parsed."""
23 def __init__(self, msg):
24 TravelPlannerException.__init__(self, msg)