Source code for transperth.exceptions

[docs]class TransperthException(Exception): """ Base exception for all exceptions thrown by this library """
[docs]class InvalidStopNumber(TransperthException): """ Thrown when the provided stop number is not a five digit number """
[docs]class InvalidDirection(TransperthException): """ Thrown when the provided direction is neither to nor from """
[docs]class InvalidStep(TransperthException): """ Thrown when a step is not one of 'bus', 'walk', or 'train' """
[docs]class NoFareData(TransperthException): """ Thrown when transperth does not provide data from which we can assertain the fare for a route """
[docs]class NotLoggedIn(TransperthException): """ Raised when the library detects that the session has expired """
[docs]class LoginFailed(NotLoggedIn): """ Thrown when a login attempt fails """
[docs]class BadStationError(TransperthException): """ Thrown when the library encounters a bad station name """
[docs]class IncompleteTrip(TransperthException): """ Thrown when a trip is missing its conclusion """