class EverythingLostException(TransactionException):

    def __init__(self, msg):
        super(TransactionException, self).__init__(msg)
try:
    raise EverythingLostException('we are doomed!')
except TransactionException:
    print('check')
try:
    raise TransactionException('we are doomed!')
except TransactionException:
    print('oops')
Can one declare an abstract exception in Python?