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 of util.DropboxError needs to be raised, any message can be passed to the util.DropboxError instance. (Our autograder does not expect any particular value of message in instances of util.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!")