app/soc/views/helper/decorators.py
changeset 1761 cf39e8705fac
parent 1632 73a9bc6a85d9
child 2077 fd2e83a297c7
--- a/app/soc/views/helper/decorators.py	Sun Mar 08 23:58:27 2009 +0000
+++ b/app/soc/views/helper/decorators.py	Mon Mar 09 00:00:13 2009 +0000
@@ -47,6 +47,8 @@
   from soc.logic.helper import timeline
   from soc.logic.models.site import logic as site_logic
   from soc.logic.models.user import logic as user_logic
+  from soc.views import out_of_band
+  from soc.views.helper import responses
 
   @wraps(func)
   def view_wrapper(request, *args, **kwds):
@@ -73,6 +75,8 @@
     except AssertionError, exception:
       logging.exception(exception)
       return http.HttpResponseRedirect('/soc/content/assertion_error.html')
+    except out_of_band.Error, error:
+      return responses.errorResponse(error, request)
 
   return view_wrapper