Permalink
Browse files

Add WriteConflictError as a native dashi exception

  • Loading branch information...
1 parent 3bd6cca commit 0e918edc855c9d10e36b92119a2bacd9848777d6 @priteau priteau committed Dec 7, 2012
Showing with 6 additions and 2 deletions.
  1. +2 −2 dashi/__init__.py
  2. +4 −0 dashi/exceptions.py
View
@@ -12,7 +12,7 @@
from kombu.entity import Queue, Exchange
from kombu.common import maybe_declare
-from exceptions import DashiError, BadRequestError, NotFoundError, UnknownOperationError
+from exceptions import DashiError, BadRequestError, NotFoundError, UnknownOperationError, WriteConflictError
log = logging.getLogger(__name__)
@@ -377,5 +377,5 @@ def raise_error(error):
raise exc_cls(**error)
ERROR_PREFIX = "dashi.exceptions."
-ERROR_TYPES = (BadRequestError, NotFoundError, UnknownOperationError)
+ERROR_TYPES = (BadRequestError, NotFoundError, UnknownOperationError, WriteConflictError)
ERROR_TYPE_MAP = dict((cls.__name__, cls) for cls in ERROR_TYPES)
View
@@ -29,3 +29,7 @@ class NotFoundError(DashiError):
class UnknownOperationError(DashiError):
pass
+
+
+class WriteConflictError(DashiError):
+ pass

0 comments on commit 0e918ed

Please sign in to comment.