'Initializes a basic exception.
@type code: L{bytes} or L{int}
@param code: Refers to an HTTP status code (for example, 200) either as
an integer or a bytestring representing such. If no C{message} is
given, C{code} is mapped to a descriptive bytestring that is used
instead.
@type message: L{bytes}
@param message: A short error message, for example "NOT FOUND".
@type response: L{bytes}
@param response: A complete HTML document for an error page.'

def __init__(self, code, message=None, response=None):

    message = (message or _codeToMessage(code))
    Exception.__init__(self, code, message, response)
    if isinstance(code, int):
        code = intToBytes(code)
    self.status = code
    self.message = message
    self.response = response
