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
23 def __init__(self
, msg
):
24 TravelPlannerException
.__init
__(self
, msg
)