1

I have the code as shown below:

 raise "Invalid destination "
rescue Exception => e
        HoptoadNotifier.notify(:error_class => e, :error_message => "#{e} : Error occured for the user #{self.user_name}")

I actually want the error message to be logged in the hoptoad as "Invalid destination : Error occured for the user username". The code as shown above works as intented. But im not able to get the back trace in the hoptoad. Please suggest on this.

Arun
  • 2,562
  • 6
  • 25
  • 43

1 Answers1

2

Explicitly pass e.backtrace to Hoptoad.nofity:

raise "Invalid destination "
rescue Exception => e
  HoptoadNotifier.notify(:error_class => e, :error_message => "#{e} : Error occured for the user #{self.user_name}", :parameters => { backtrace => e.backtrace })
Florent2
  • 3,463
  • 3
  • 28
  • 38