app/soc/views/helper/decorators.py
changeset 1582 f2f352ad193f
parent 1454 37eb949c3267
child 1585 06fb5950cb03
--- a/app/soc/views/helper/decorators.py	Sun Mar 01 20:00:54 2009 +0000
+++ b/app/soc/views/helper/decorators.py	Sun Mar 01 20:18:23 2009 +0000
@@ -45,15 +45,15 @@
   def view_wrapper(*args, **kwds):
     try:
       return func(*args, **kwds)
-    except DeadlineExceededError:
-      logging.exception('DeadlineExceededError')
-      return http.HttpResponse('DeadlineExceededError')
-    except MemoryError:
-      logging.exception('MemoryError')
-      return http.HttpResponse('MemoryError')
-    except AssertionError:
-      logging.exception('AssertionError')
-      return http.HttpResponse('AssertionError')
+    except DeadlineExceededError, e:
+      logging.exception(e)
+      return http.HttpResponseRedirect('/soc/content/deadline_exceeded.html')
+    except MemoryError, e:
+      logging.exception(e)
+      return http.HttpResponseRedirect('/soc/content/memory_error.html')
+    except AssertionError, e:
+      logging.exception(e)
+      return http.HttpResponseRedirect('/soc/content/assertion_error.html')
 
   return view_wrapper