Commit c64145e7 authored by Romain Courteaud's avatar Romain Courteaud 🐸

slap/exception: all slap Exception must have a common parent class

This will allow to catch only the slap exceptions.
parent 70ccd32a
......@@ -31,23 +31,26 @@
from zope.interface import implementer
from .interface import slap as interface
class SlapException(Exception):
pass
"""Exposed exceptions"""
@implementer(interface.IResourceNotReady)
class ResourceNotReady(Exception):
class ResourceNotReady(SlapException):
pass
@implementer(interface.IServerError)
class ServerError(Exception):
class ServerError(SlapException):
pass
@implementer(interface.INotFoundError)
class NotFoundError(Exception):
class NotFoundError(SlapException):
pass
class AuthenticationError(Exception):
class AuthenticationError(SlapException):
pass
@implementer(interface.IConnectionError)
class ConnectionError(Exception):
class ConnectionError(SlapException):
pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment