package Exceptions~__RequestDone(message, data, code)

Thrown to shortcut request handling. API will catch this exception and send the HTTP response code and (optional) data. This is useful to immediately stop request processing, especially from deeply nested locations in the call stack where it would be cumbersome to pass return information (especially errors) all the way back up the call stack. Typically, users should throw RequestError for error responses or

new package __RequestDone(message, data, code)

Create an exception.
Parameters:
Name Type Description
message String An error message
data Object A JSON object containing additional data
code Integer An optional code to override exception's default STATUS
See:
  • RequestOkay for non-error responses (not @this).

Members

static schema

Gets a Todea Schema object.