From: Tom Hughes Date: Wed, 13 Jan 2010 13:34:59 +0000 (+0000) Subject: I really wish rails would stop trying to hide exceptions from me... X-Git-Tag: live~6371^2~19 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/8865543903caa9cf364f6443c42a4b5600505375?hp=7381dad23bcb737d5b08a73027eda9a80c3ef293 I really wish rails would stop trying to hide exceptions from me... --- 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