File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 11class LabelboxError (Exception ):
22 """Base class for exceptions."""
3+
34 def __init__ (self , message , cause = None ):
45 """
56 Args:
@@ -27,6 +28,7 @@ class AuthorizationError(LabelboxError):
2728
2829class ResourceNotFoundError (LabelboxError ):
2930 """Exception raised when a given resource is not found. """
31+
3032 def __init__ (self , db_object_type , params ):
3133 """ Constructor.
3234
@@ -66,6 +68,7 @@ class InvalidQueryError(LabelboxError):
6668
6769class NetworkError (LabelboxError ):
6870 """Raised when an HTTPError occurs."""
71+
6972 def __init__ (self , cause ):
7073 super ().__init__ (str (cause ), cause )
7174 self .cause = cause
@@ -79,6 +82,7 @@ class TimeoutError(LabelboxError):
7982class InvalidAttributeError (LabelboxError ):
8083 """ Raised when a field (name or Field instance) is not valid or found
8184 for a specific DB object type. """
85+
8286 def __init__ (self , db_object_type , field ):
8387 super ().__init__ ("Field(s) '%r' not valid on DB type '%s'" %
8488 (field , db_object_type .type_name ()))
You can’t perform that action at this time.
0 commit comments