Files
tuir/rtv/exceptions.py
2015-08-09 19:25:29 +02:00

36 lines
667 B
Python

class EscapeInterrupt(Exception):
"Signal that the ESC key has been pressed"
class RTVError(Exception):
"Base RTV error class"
class AccountError(RTVError):
"Could not access user account"
class SubmissionError(RTVError):
"Submission could not be loaded"
def __init__(self, url):
self.url = url
class SubredditError(RTVError):
"Subreddit could not be reached"
def __init__(self, name):
self.name = name
class SubscriptionError(RTVError):
"Subscriptions could not be fetched"
class ProgramError(RTVError):
"Problem executing an external program"
def __init__(self, name):
self.name = name