super_exception_notifier 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +1 -1
- data/lib/exception_notifier.rb +7 -7
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/exception_notifier.rb
CHANGED
@@ -79,8 +79,8 @@ class ExceptionNotifier < ActionMailer::Base
|
|
79
79
|
|
80
80
|
# What is the path of the file we will render to the user based on a given exception class?
|
81
81
|
def self.get_view_path_for_class(exception, verbose = false)
|
82
|
-
return self.catch_all if exception.nil?
|
83
|
-
return self.catch_all unless exception.is_a?(StandardError) || exception.is_a?(Class) # For some reason exception.is_a?(Class) works in console, but not when running in mongrel (ALWAYS returns false)?!?!?
|
82
|
+
return self.catch_all(verbose) if exception.nil?
|
83
|
+
#return self.catch_all(verbose) unless exception.is_a?(StandardError) || exception.is_a?(Class) # For some reason exception.is_a?(Class) works in console, but not when running in mongrel (ALWAYS returns false)?!?!?
|
84
84
|
filepaths = ExceptionNotifier.exception_to_filenames(exception).map do |file|
|
85
85
|
ExceptionNotifier.get_view_path(file, verbose)
|
86
86
|
end.compact
|
@@ -95,20 +95,20 @@ class ExceptionNotifier < ActionMailer::Base
|
|
95
95
|
# Check the usual suspects
|
96
96
|
def self.get_view_path(file_name, verbose = false)
|
97
97
|
if File.exist?("#{RAILS_ROOT}/public/#{file_name}.html")
|
98
|
-
puts "[FOUND FILE] #{RAILS_ROOT}/public/#{file_name}.html" if verbose
|
98
|
+
puts "[FOUND FILE:A] #{RAILS_ROOT}/public/#{file_name}.html" if verbose
|
99
99
|
"#{RAILS_ROOT}/public/#{file_name}.html"
|
100
100
|
elsif !config[:view_path].nil? && File.exist?("#{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html.erb")
|
101
|
-
puts "[FOUND FILE] #{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html.erb" if verbose
|
101
|
+
puts "[FOUND FILE:B] #{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html.erb" if verbose
|
102
102
|
"#{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html.erb"
|
103
103
|
elsif !config[:view_path].nil? && File.exist?("#{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html")
|
104
|
-
puts "[FOUND FILE] #{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html" if verbose
|
104
|
+
puts "[FOUND FILE:C] #{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html" if verbose
|
105
105
|
"#{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html"
|
106
106
|
elsif File.exist?("#{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html.erb")
|
107
|
-
puts "[FOUND FILE] #{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html.erb" if verbose
|
107
|
+
puts "[FOUND FILE:D] #{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html.erb" if verbose
|
108
108
|
"#{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html.erb"
|
109
109
|
elsif File.exist?("#{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html")
|
110
110
|
#ExceptionNotifierHelper::COMPAT_MODE ? "#{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html" : "#{status_cd}.html"
|
111
|
-
puts "[FOUND FILE] #{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html" if verbose
|
111
|
+
puts "[FOUND FILE:E] #{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html" if verbose
|
112
112
|
"#{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html"
|
113
113
|
else
|
114
114
|
nil
|