# Path: restkit/errors.py
# class ResourceError(Exception):
# class ResourceNotFound(ResourceError):
# class Unauthorized(ResourceError):
# class ResourceGone(ResourceError):
# class RequestFailed(ResourceError):
# class RedirectLimit(Exception):
# class RequestError(Exception):
# class RequestTimeout(Exception):
# class InvalidUrl(Exception):
# class ResponseError(Exception):
# class ProxyError(Exception):
# class BadStatusLine(Exception):
# class ParserError(Exception):
# class UnexpectedEOF(Exception):
# class AlreadyRead(Exception):
# class ProxyError(Exception):
# class ParseException(Exception):
# class NoMoreData(ParseException):
# class InvalidRequestLine(ParseException):
# class InvalidRequestMethod(ParseException):
# class InvalidHTTPVersion(ParseException):
# class InvalidHTTPStatus(ParseException):
# class InvalidHeader(ParseException):
# class InvalidHeaderName(ParseException):
# class InvalidChunkSize(ParseException):
# class ChunkMissingTerminator(ParseException):
# class HeaderLimit(ParseException):
#     def __init__(self, msg=None, http_code=None, response=None):
#     def _get_message(self):
#     def _set_message(self, msg):
#     def __str__(self):
#     def __init__(self, buf=None):
#     def __str__(self):
#     def __init__(self, req):
#     def __str__(self):
#     def __init__(self, method):
#     def __str__(self):
#     def __init__(self, version):
#     def __str__(self):
#     def __init__(self, status):
#     def __str__(self):
#     def __init__(self, hdr):
#     def __str__(self):
#     def __init__(self, hdr):
#     def __str__(self):
#     def __init__(self, data):
#     def __str__(self):
#     def __init__(self, term):
#     def __str__(self):


import webob.exc
from restkit import errors
        klass = webob.exc.status_map[http_code]
        self.code = http_code
        self.title = klass.title
        self.status = '%s %s' % (self.code, self.title)
        self.explanation = msg
        self.response = response
        # default params
        self.msg = msg

    def _status_int__get(self):
        """
        The status as an integer
        """
        return int(self.status.split()[0])
    def _status_int__set(self, value):
        self.status = value
    status_int = property(_status_int__get, _status_int__set, 
        doc=_status_int__get.__doc__)

    def _get_message(self):
        return self.explanation
    def _set_message(self, msg):
        self.explanation = msg or ''
    message = property(_get_message, _set_message)

webob_exceptions = False
def wrap_exceptions():
    """ wrap restkit exception to return WebBob exceptions"""
    global webob_exceptions
    if webob_exceptions: return

# Path: restkit/errors.py
# class ResourceError(Exception):
# class ResourceNotFound(ResourceError):
# class Unauthorized(ResourceError):
# class ResourceGone(ResourceError):
# class RequestFailed(ResourceError):
# class RedirectLimit(Exception):
# class RequestError(Exception):
# class RequestTimeout(Exception):
# class InvalidUrl(Exception):
# class ResponseError(Exception):
# class ProxyError(Exception):
# class BadStatusLine(Exception):
# class ParserError(Exception):
# class UnexpectedEOF(Exception):
# class AlreadyRead(Exception):
# class ProxyError(Exception):
# class ParseException(Exception):
# class NoMoreData(ParseException):
# class InvalidRequestLine(ParseException):
# class InvalidRequestMethod(ParseException):
# class InvalidHTTPVersion(ParseException):
# class InvalidHTTPStatus(ParseException):
# class InvalidHeader(ParseException):
# class InvalidHeaderName(ParseException):
# class InvalidChunkSize(ParseException):
# class ChunkMissingTerminator(ParseException):
# class HeaderLimit(ParseException):
#     def __init__(self, msg=None, http_code=None, response=None):
#     def _get_message(self):
#     def _set_message(self, msg):
#     def __str__(self):
#     def __init__(self, buf=None):
#     def __str__(self):
#     def __init__(self, req):
#     def __str__(self):
#     def __init__(self, method):
#     def __str__(self):
#     def __init__(self, version):
#     def __str__(self):
#     def __init__(self, status):
#     def __str__(self):
#     def __init__(self, hdr):
#     def __str__(self):
#     def __init__(self, hdr):
#     def __str__(self):
#     def __init__(self, data):
#     def __str__(self):
#     def __init__(self, term):
#     def __str__(self):


# Path: restkit/contrib/webob_helper.py
import webob.exc
from restkit import errors

        klass = webob.exc.status_map[http_code]
        self.code = http_code
        self.title = klass.title
        self.status = '%s %s' % (self.code, self.title)
        self.explanation = msg
        self.response = response
        # default params
        self.msg = msg

    def _status_int__get(self):
        """
        The status as an integer
        """
        return int(self.status.split()[0])
    def _status_int__set(self, value):
        self.status = value
    status_int = property(_status_int__get, _status_int__set, 
        doc=_status_int__get.__doc__)

    def _get_message(self):
        return self.explanation
    def _set_message(self, msg):
        self.explanation = msg or ''
    message = property(_get_message, _set_message)

webob_exceptions = False
def wrap_exceptions():
    """ wrap restkit exception to return WebBob exceptions"""
    global webob_exceptions
    if webob_exceptions: return

    errors.ResourceError = WebobResourceError