Module rhino.errors

Exceptions

class HTTPException

Base class for HTTP Exceptions

Class variables:

code
The status code (int)
message
If present, an HTML error page will be sent that contains this message. The contents of message will be HTML-escaped.

Instance properties:

response
The rhino.Response instance that will be sent to the client.

The constructor takes one argument, an optional message that will replace the default message. Subclasses can override the constructor to require error-specific arguments.

class Redirection

Base class for redirections (3xx).

class ClientError

Base class for client errors (4xx).

class ServerError

Base class for server errors (5xx).

class MovedPermanently

301 Moved Permanently.

Required arguments:

location
The value for the Location header.

class Found

302 Found.

Required arguments:

location
The value for the Location header.

class SeeOther

303 See Other.

Required arguments:

location
The value for the Location header.

class TemporaryRedirect

307 Temporary Redirect.

Required arguments:

location
The value for the Location header.

class BadRequest

400 Bad Request.

class Unauthorized

401 Unauthorized.

Required arguments:

scheme
The authentication scheme to use, e.g. 'Basic'.
**params
Parameters for the WWW-Authenticate header, e.g. realm="my website".

class Forbidden

403 Forbidden.

class NotFound

404 NotFound.

class MethodNotAllowed

405 Method Not Allowed.

Required arguments:

allow
The value for the 'Allow' header (A list of comma-separated HTTP method names).

class NotAcceptable

406 Not Acceptable.

class Gone

410 Gone.

class UnsupportedMediaType

415 Unsupported Media Type.

class InternalServerError

500 Internal Server Error.