3.3. Error API
The util
module provides the following error type, which you should raise when you encounter an error case in the client implementation.
3.3.1. Types
- class util.DropboxError([message: str])
An exception class for raising errors in the implementation of the Client API.
The
message
parameter is optional. Whenever an instance ofutil.DropboxError
needs to be raised, anymessage
can be passed to theutil.DropboxError
instance. (Our autograder does not expect any particular value ofmessage
in instances ofutil.DropboxError
, but the field is provided to help you with debugging.)Example usage:
if some_good_thing: # Some good thing happens return else: # Some bad thing happens: raise util.DropboxError("Something bad happened!")