From 8865543903caa9cf364f6443c42a4b5600505375 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 13 Jan 2010 13:34:59 +0000 Subject: [PATCH 1/1] I really wish rails would stop trying to hide exceptions from me... --- app/controllers/browse_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index 5c7912d15..a77b0f94a 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -84,6 +84,12 @@ private SystemTimer.timeout_after(30) do yield end + rescue ActionView::TemplateError => ex + if ex.original_exception.is_a?(Timeout::Error) + render :action => "timeout", :status => :request_timeout + else + raise + end rescue Timeout::Error render :action => "timeout", :status => :request_timeout end -- 2.43.2