Commits

divius committed 9c48004

zerojson.exceptions: Added ObjectNotFound

Comments (0)

Files changed (5)

 v0.6.1
 -------
 
+Features:
+
+- Added :exc:`pycom.ObjectNotFound`
+- Vastly updated documentation
+
 Changes:
 
 - Remote methods of :class:`pycom.ProxyComponent` no longer return Python

pycom/__init__.py

     AccessDenied,           # Access denied to this function
     ServiceNotAvailable,    # Remote service not available
     SessionExpired,         # Client session has expired
+    ObjectNotFound,         # Requested object not found
     create_task,            # Create repeatable task
     ioloop,                 # IOLoop instance for a service
     )

zerojson/__init__.py

     BadRequest,             # Client issued invalid request
     AccessDenied,           # Access denied to this function
     ServiceNotAvailable,    # Remote service not available
-    SessionExpired,         # Client session has expired
+    SessionExpired,         # Client session has expired,
+    ObjectNotFound,         # Requested object not found
     )
 
 from .utils import (

zerojson/constants.py

 ERROR_BAD_REQUEST = 4
 ERROR_ACCESS_DENIED = 5
 ERROR_SESSION_EXPIRED = 6
+ERROR_OBJECT_NOT_FOUND = 7
 
 # Protocol constants
 

zerojson/exceptions.py

     code = constants.ERROR_SESSION_EXPIRED
 
 
+class ObjectNotFound(RemoteError):
+    """Requested object not found."""
+
+    code = constants.ERROR_OBJECT_NOT_FOUND
+
+
 # Local-only exceptions