9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/bullhorn/sender.rb', line 9
def notify(exception, env)
bt = Backtrace.new(exception, :context => @show_code_context)
Net::HTTP.post_form(URI(url), {
:api_key => api_key,
:message => exception.message,
:backtrace => serialize(bt.to_a),
:env => serialize(whitelist(env)),
:request_body => serialize(whitelist(request_body(env))),
:sha1 => sha1(exception),
:language => Bullhorn::LANGUAGE,
:client_name => Bullhorn::CLIENT_NAME,
:client_version => Bullhorn::VERSION,
:url => [ "http://", env['HTTP_HOST'], env['REQUEST_URI'] ].join(''),
:class => exception.class.to_s
})
end
|