Regular expressions fixed
[diaspy.git] / diaspy / errors.py
index 90cc28dc3db72146cf1369b35eb04000759aed4c..d4eac5fd791019fe2742eb8bbf442dc575889fb7 100644 (file)
@@ -22,6 +22,42 @@ class UserError(DiaspyError):
     pass
 
 
+class InvalidHandleError(DiaspyError):
+    """Raised when invalid handle is found.
+    """
+    pass
+
+
+class SearchError(DiaspyError):
+    """Exception raised when something related to search goes wrong.
+    """
+    pass
+
+
+class ConversationError(DiaspyError):
+    """Exception raised when something related to conversations goes wrong.
+    """
+    pass
+
+
+class AspectError(DiaspyError):
+    """Exception raised when something related to aspects goes wrong.
+    """
+    pass
+
+
+class PostError(DiaspyError):
+    """Exception raised when something related to posts goes wrong.
+    """
+    pass
+
+
+class StreamError(DiaspyError):
+    """Exception raised when something related to streams goes wrong.
+    """
+    pass
+
+
 def react(r, message='', accepted=[200, 201, 202, 203, 204, 205, 206], exception=DiaspyError):
     """This method tries to decides how to react
     to a response code passed to it. If it's an