aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/base.rb2
-rw-r--r--actionpack/lib/action_view/compiled_templates.rb2
-rw-r--r--actionpack/lib/action_view/helpers/debug_helper.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index b38501359c..f3e2347d45 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -510,7 +510,7 @@ module ActionView #:nodoc:
else
CompiledTemplates.module_eval(render_source, 'compiled-template', -line_offset)
end
- rescue Object => e
+ rescue Exception => e # errors from template code
if logger
logger.debug "ERROR: compiling #{render_symbol} RAISED #{e}"
logger.debug "Function body: #{render_source}"
diff --git a/actionpack/lib/action_view/compiled_templates.rb b/actionpack/lib/action_view/compiled_templates.rb
index a00a7578bb..deb730f4da 100644
--- a/actionpack/lib/action_view/compiled_templates.rb
+++ b/actionpack/lib/action_view/compiled_templates.rb
@@ -55,7 +55,7 @@ module ActionView
begin
module_eval(method_def, fake_file_name, initial_line_number)
@mtimes[full_key(identifier, arg_names)] = Time.now
- rescue Object => e
+ rescue Exception => e # errors from compiled source
e.blame_file! identifier
raise
end
diff --git a/actionpack/lib/action_view/helpers/debug_helper.rb b/actionpack/lib/action_view/helpers/debug_helper.rb
index 8baea6f450..9e92813a18 100644
--- a/actionpack/lib/action_view/helpers/debug_helper.rb
+++ b/actionpack/lib/action_view/helpers/debug_helper.rb
@@ -7,7 +7,7 @@ module ActionView
begin
Marshal::dump(object)
"<pre class='debug_dump'>#{h(object.to_yaml).gsub(" ", "&nbsp; ")}</pre>"
- rescue Object => e
+ rescue Exception => e # errors from Marshal or YAML
# Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
"<code class='debug_dump'>#{h(object.inspect)}</code>"
end