1
0
mirror of https://github.com/enpaul/kodak.git synced 2024-11-11 00:57:00 +00:00
kodak/fresnel_lens/exceptions.py

40 lines
665 B
Python
Raw Normal View History

2020-12-22 02:08:01 +00:00
"""Application exceptions
::
2021-10-28 23:03:09 +00:00
FresnelException
2020-12-22 02:08:01 +00:00
+-- ClientError
+-- ServerError
"""
2021-10-28 23:03:09 +00:00
class FresnelException(Exception):
2020-12-22 02:08:01 +00:00
"""Whomp whomp, something went wrong
But seriously, don't ever raise this exception
"""
status: int
2021-10-28 23:03:09 +00:00
class ClientError(FresnelException):
2020-12-22 02:08:01 +00:00
"""Error while processing client side input"""
status = 400
class ImageResourceDeletedError(ClientError):
"""Requested image resource has been deleted"""
status = 410
2021-10-28 23:03:09 +00:00
class ServerError(FresnelException):
2020-12-22 02:08:01 +00:00
"""Error while processing server side data"""
status = 500
class ImageFileRemovedError(ServerError):
"""Image file removed from server"""