16 lines
347 B
Python
16 lines
347 B
Python
"""Shared exception types."""
|
|||
|
|
|
||
|
|
__all__ = ["BackendError", "Denied"]
|
||
|
|
|
||
|
|
|
||
|
|
class BackendError(Exception):
|
||
|
|
def __init__(self, message, status=0):
|
||
|
|
super().__init__(message)
|
||
|
|
self.status = status
|
||
|
|
|
||
|
|
|
||
|
|
class Denied(Exception):
|
||
|
|
def __init__(self, guidance=""):
|
||
|
|
super().__init__("denied by user")
|
||
|
|
self.guidance = guidance
|