newmediamonitoring/polls/exceptions.py

8 lines
259 B
Python
Raw Normal View History

2020-09-03 02:56:28 +00:00
class ClientError(Exception):
"""
Custom exception class that is caught by the websocket receive()
handler and translated into a send back to the client.
"""
def __init__(self, code):
super().__init__(code)
self.code = code