def error(self, message, data=None, code=None):
result = {'<STR_LIT:status>': '<STR_LIT:error>', '<STR_LIT:message>': message}<EOL>if data:<EOL><INDENT>result['<STR_LIT:data>'] = data<EOL><DEDENT>if code:<EOL><INDENT>result['<STR_LIT:code>'] = code<EOL><DEDENT>self.write(result)<EOL>self.finish()<EOL>
An error occurred in processing the request, i.e. an exception was
        thrown.

        :type  data: A JSON-serializable object
        :param data: A generic container for any other information about the
            error, i.e. the conditions that caused the error,
            stack traces, etc.
        :type  message: A JSON-serializable object
        :param message: A meaningful, end-user-readable (or at the least
            log-worthy) message, explaining what went wrong
        :type  code: int
        :param code: A numeric code corresponding to the error, if applicable