""" Application exceptions ====================== """ class FailedToStartError(Exception): """Should be raised when application fails to start """ def __init__(self, reason, *args, **kwargs): super(FailedToStartError).__init__(*args, **kwargs) self.reason = reason def __str__(self): return 'Application failed to start due to: {0}'.format(self.reason) class RetryCountExceededError(Exception): """Raised by @retry decorator when it exceeds the defined retry count """ def __str__(self): return 'Method retry count exceeded'