Skip to content

drugpl/exceptioner

Repository files navigation

Exceptioner

Stay notified about exceptions by various transports Email, HTTP, Jabber, IRC, Campfire etc. Choose the option you want.

The most common use is to use Exceptioner as rack middleware and send notifications when an exception occur in you web application. It may be used with Rails, Sinatra or any other rack citizen. Exceptioner may be also used with any ruby code you want. Just configure delivery methods and don’t miss any exception.

Disclaimer

Still under development. Not released yet.

Currently available delivery methods

  • Email

  • HTTP

  • Jabber/XMPP

  • IRC

  • Campfire

  • Redmine

Usage

Note: Exceptioner is under heavy development and it is not recommended to use for production applications.

Exceptioner-edge

Gemfile

# exceptioner-core
gem :exceptioner-core, :git => 'https://github.com/drugpl/exceptioner'

# use one or many of following transports
gem :exceptioner-mail, :git => 'https://github.com/drugpl/exceptioner'
gem :exceptioner-http, :git => 'https://github.com/drugpl/exceptioner'
gem :exceptioner-irc, :git => 'https://github.com/drugpl/exceptioner'
gem :exceptioner-jabber, :git => 'https://github.com/drugpl/exceptioner'
gem :exceptioner-redmine, :git => 'https://github.com/drugpl/exceptioner'

Run initializer

Exceptioner.setup do |config|

    config.transports = [:mail]

    config.mail.recipients = %w[[email protected] [email protected]]

end

For transport specific options conform transport README

Configuration

TODO

Rails 3 users

Add to your Gemfile

gem 'exceptioner'

and obviously run bundle install

Then copy config file to your application

rails generate exceptioner:install.

You probably want to check config/initializers/exceptioner.rb and customize it a bit

Rails 2.X users

Exceptioner::ApplicationController will be included into ActionController::Base. Create config/initializers/exceptioner.rb

Exceptioner.setup do |config|
    config.transports = [:mail]
    config.mail.recipients %w[[email protected]]
    # Lookup documentation for more config options
end

Any Rack application users

gem install exceptioner

Then require exceptioner and add Exceptioner::Middleware to your stack

Any Ruby application users

gem install exceptioner

Then require excptioner and use it like:

begin
    # some code which may fail
rescue VeryFatalError => e
    Exceptioner.notify(e)
end

Contributors

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2011 Dolnośląski Ruby User Group. See LICENSE for details.

Releases

No releases published

Packages

No packages published