13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/errorstack.rb', line 13
def self.notify(exception)
raise "You must specify a STACK_KEY" unless defined? STACK_KEY
params = {
:_s => STACK_KEY,
:_r => "json",
:postingIP => "0.0.0.0",
:createdDate => Time.now.to_s,
:message => exception.message,
}
params[:backtrace] = exception.backtrace.join(",") rescue ""
begin
RestClient.post("http://www.errorstack.com/submit", params)
rescue
raise "Unable to submit an ErrorStack error."
end
end
|