Module for all xblock exception classes
xblock.exceptions.
DisallowedFileError
¶Raised by open_local_resource()
if the requested file is not allowed.
xblock.exceptions.
FieldDataDeprecationWarning
¶Warning for use of deprecated _field_data accessor
xblock.exceptions.
InvalidScopeError
(invalid_scope, valid_scopes=None)¶Raised to indicated that operating on the supplied scope isn’t allowed by a KeyValueStore
xblock.exceptions.
JsonHandlerError
(status_code, message)¶Raised by a function decorated with XBlock.json_handler to indicate that an error response should be returned.
get_response
(**kwargs)¶Returns a Response object containing this object’s status code and a JSON object containing the key “error” with the value of this object’s error message in the body. Keyword args are passed through to the Response.
xblock.exceptions.
KeyValueMultiSaveError
(saved_field_names)¶Raised to indicated an error in saving multiple fields in a KeyValueStore
Create a new KeyValueMultiSaveError
saved_field_names - an iterable of field names (strings) that were successfully saved before the exception occurred
xblock.exceptions.
NoSuchDefinition
¶Raised by IdReader.get_block_type()
if the definition doesn’t exist.
xblock.exceptions.
NoSuchHandlerError
¶Raised to indicate that the requested handler was not found.
xblock.exceptions.
NoSuchServiceError
¶Raised to indicate that a requested service was not found.
xblock.exceptions.
NoSuchUsage
¶Raised by IdReader.get_definition_id()
if the usage doesn’t exist.
xblock.exceptions.
NoSuchViewError
(block, view_name)¶Raised to indicate that the view requested was not found.
Create a new NoSuchViewError
Parameters: |
|
---|
xblock.exceptions.
XBlockNotFoundError
(usage_id)¶Raised to indicate that an XBlock could not be found with the requested usage_id
xblock.exceptions.
XBlockSaveError
(saved_fields, dirty_fields, message=None)¶Raised to indicate an error in saving an XBlock
Create a new XBlockSaveError
saved_fields - a set of fields that were successfully saved before the error occurred dirty_fields - a set of fields that were left dirty after the save