9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/me_exceptional/action_controller_extension.rb', line 9
def exception_catcher(e)
if Rails.env == 'production'
MeExceptional::Mailer.exceptional(e.message,
:backtrace => e.backtrace.join("<br />"),
:timestamp => Time.zone.now,
:method => request.method,
:url => request.url,
:params => params.inspect.to_s,
:user_agent => request.user_agent,
:client_ip => request.env["HTTP_X_FORWARDED_FOR"].split(',').first,
:request_env => request.env.inspect.to_s).deliver
end
raise e
end
|