Package restkit :: Package contrib :: Module webob_helper :: Class WebobResourceError
[hide private]

Class WebobResourceError

source code

                      object --+        
                               |        
         webob.response.Response --+    
                                   |    
              object --+           |    
                       |           |    
exceptions.BaseException --+       |    
                           |       |    
        exceptions.Exception --+   |    
                               |   |    
         webob.exc.HTTPException --+    
                                   |    
         webob.exc.WSGIHTTPException --+
                                       |
                                      WebobResourceError

Wrapper to return webob exceptions instead of restkit errors. Usefull for those who want to build `WSGI <http://wsgi.org/wsgi/>`_ applications speaking directly to others via HTTP.

To do it place somewhere in your application the function `wrap_exceptions`:

   wrap_exceptions()

It will automatically replace restkit errors by webob exceptions.

Instance Methods [hide private]
 
__init__(self, msg=None, http_code=None, response=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_status_int__get(self)
The status as an integer
source code
 
_status_int__set(self, value) source code
 
_get_message(self) source code
 
_set_message(self, msg) source code

Inherited from webob.exc.WSGIHTTPException: __call__, __str__, generate_response, html_body, plain_body

Inherited from webob.exc.WSGIHTTPException (private): _make_body

Inherited from webob.response.Response: __repr__, app_iter_range, conditional_response_app, copy, decode_content, delete_cookie, encode_content, md5_etag, merge_cookies, set_cookie, unset_cookie, write

Inherited from exceptions.Exception: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __setattr__, __setstate__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from webob.response.Response: from_file

Class Variables [hide private]

Inherited from webob.exc.WSGIHTTPException: body_template_obj, code, empty_body, explanation, html_template_obj, plain_template_obj, title

Inherited from webob.response.Response: default_charset, default_conditional_response, default_content_type, environ, request, unicode_errors

Properties [hide private]
  status_int
The status as an integer
  message

Inherited from webob.exc.WSGIHTTPException: wsgi_response

Inherited from webob.response.Response: accept_ranges, age, allow, app_iter, body, body_file, cache_control, cache_expires, charset, content_disposition, content_encoding, content_language, content_length, content_location, content_md5, content_range, content_type, content_type_params, date, etag, etag_strong, expires, headerlist, headers, json, json_body, last_modified, location, pragma, retry_after, server, status, status_code, text, ubody, unicode_body, vary, www_authenticate

Inherited from webob.response.Response (private): _etag_raw

Inherited from webob.exc.HTTPException: exception

Inherited from exceptions.BaseException: args

Inherited from object: __class__

Method Details [hide private]

__init__(self, msg=None, http_code=None, response=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

Property Details [hide private]

status_int

The status as an integer

Get Method:
_status_int__get(self) - The status as an integer
Set Method:
_status_int__set(self, value)

message

Get Method:
_get_message(self)
Set Method:
_set_message(self, msg)