From 11af089cee0a0e744e267d32becfe2c66a586d31 Mon Sep 17 00:00:00 2001
From: Joshua Peek
Date: Sat, 2 May 2009 23:02:22 -0500
Subject: Extract ActionController rescue templates into Rescue and
ShowExceptions middleware.
This commit breaks all exception catching plugins like ExceptionNotifier. These plugins should be rewritten as middleware instead overriding Controller#rescue_action_in_public.
---
.../middleware/templates/rescues/template_error.erb | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.erb
(limited to 'actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.erb')
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.erb
new file mode 100644
index 0000000000..02fa18211d
--- /dev/null
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.erb
@@ -0,0 +1,21 @@
+
+ <%=h @exception.original_exception.class.to_s %> in
+ <%=h @request.parameters["controller"].capitalize if @request.parameters["controller"]%>#<%=h @request.parameters["action"] %>
+
+
+
+ Showing <%=h @exception.file_name %> where line #<%=h @exception.line_number %> raised:
+
<%=h @exception.message %>
+
+
+Extracted source (around line #<%=h @exception.line_number %>):
+
<%=h @exception.source_extract %>
+
+<%=h @exception.sub_template_message %>
+
+<% @real_exception = @exception
+ @exception = @exception.original_exception || @exception %>
+<%= render :file => "rescues/_trace.erb" %>
+<% @exception = @real_exception %>
+
+<%= render :file => "rescues/_request_and_response.erb" %>
--
cgit v1.2.3