Ruby
Install Exceptional in your Ruby app
-
Install the exceptional gem
$ gem install exceptional -
Install the json gem of your choice (choices are: json, json_pure, yajl-ruby, json-jruby)
$ gem install json -
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. -
Require the Exceptional gem in your ruby code
require 'rubygems'
require 'exceptional' -
Configure Exceptional for your ruby app
Exceptional::Config.load("config/exceptional.yml") -
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')