[MERGE] from master
[odoo/odoo.git] / openerp / addons / base / ir / ir_http.py
index 64e6636..c70be2c 100644 (file)
@@ -96,6 +96,10 @@ class ir_http(osv.AbstractModel):
 
     def _handle_exception(self, exception):
         # If handle_exception returns something different than None, it will be used as a response
+
+        # Don't handle exception but use werkeug debugger if server in --dev mode
+        if openerp.tools.config['dev_mode']:
+            raise
         try:
             return request._handle_exception(exception)
         except openerp.exceptions.AccessDenied:
@@ -119,7 +123,6 @@ class ir_http(osv.AbstractModel):
         if processing:
             return processing
 
-
         # set and execute handler
         try:
             request.set_handler(func, arguments, auth_method)