Skip to content
sahilbathlavinsol edited this page Nov 30, 2014 · 10 revisions

About

This gem is used if you need to be notified for the exceptions raised at your frontend using (javaScript), all you need to do is send a AJAX request to backend which will then notify to all the emails highlighted by the exception notifier being used.

Dependencies

You need to have one of the following Exception handling gem running in your application

  1. Exception Notification
  2. Bugsnag

How to use

Install the gem in your application

  1. Add to Gemfile gem 'jsexceptionhandler'

  2. Install directly gem install jsexceptionhandler

Make sure you have installed one of the dependent gems and have did the configuration to add the emails.

Handle front-end exception using try catch

 try {
   ...
 } catch {
   $.ajax({
   url: 'app_url/javascript_exception_handler',
   type: 'GET',
   data: {}, //any data you want to send to describe your exception
 });
}

Support

Rails >= 3

Clone this wiki locally