Ruby

Install Exceptional in your Ruby app

  1. Install the exceptional gem
    $ gem install exceptional

  2. Install the json gem of your choice (choices are: json, json_pure, yajl-ruby, json-jruby)
    $ gem install json

  3. Generate the Exceptional config file (config/exceptional.yml)
    If you are using bundler:
    $ bundle exec exceptional install YOUR-API-KEY
    If you are using bundler:
    $ exceptional install YOUR-API-KEY
    You will find your key in the apps settings screen in Exceptional.

  4. Require the Exceptional gem in your ruby code
    require 'rubygems'
    require 'exceptional'

  5. Configure Exceptional for your ruby app
    Exceptional::Config.load("config/exceptional.yml")

  6. Use Exceptional block to catch exceptions in your ruby code in different ways

     Exceptional.rescue do
       # Exceptions inside this block will be reported to getexceptional.com
     end
    
     Exceptional.rescue_and_reraise do
       # Exceptions will be reported to getexceptional.com and then
       # re-raised to your ruby code
     end
    
     # This will report the exception e to getexceptional.com
     Exceptional.handle(e, 'some extra information')