public
Clone URL: git://github.com/defunkt/exception_logger.git
edge controller rescue hotness

git-svn-id: 
http://svn.techno-weenie.net/projects/plugins/exception_logger@2564 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Wed Dec 20 00:48:48 -0800 2006
commit  9e2706f7e57dded3159fcf774c279277512fdca8
tree    22cadabd23c0f7fbe606fc0e41a5ecedccf45951
parent  30f43993d5ade0cbf8631153c8a475bc4e71ed6f
...
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
 
 
 
79
80
81
...
53
54
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
 
 
 
 
 
 
 
57
58
59
60
61
62
0
@@ -53,29 +53,10 @@ module ExceptionLoggable
0
     !self.class.local_addresses.detect { |addr| addr.include?(remote) }.nil?
0
   end
0
 
0
- def render_404(exception)
0
- respond_to do |format|
0
- format.html { render :file => "#{RAILS_ROOT}/public/404.html", :status => 400 }
0
- format.all { head :status => 404 }
0
- end
0
- end
0
-
0
- def render_500(exception)
0
- respond_to do |format|
0
- format.html { render :file => "#{RAILS_ROOT}/public/500.html", :status => 500 }
0
- format.all { head :status => 500 }
0
- end
0
- end
0
-
0
   def rescue_action_in_public(exception)
0
- case exception
0
- when ActiveRecord::RecordNotFound, ActionController::UnknownController, ActionController::UnknownAction
0
- render_404(exception)
0
-
0
- else
0
- render_500(exception)
0
- log_exception(exception)
0
- end
0
+ status = response_code_for_rescue(exception)
0
+ render_optional_error_file status
0
+ log_exception(exception) if status == :internal_server_error
0
   end
0
 
0
   def log_exception(exception)

Comments

    No one has commented yet.