exceptioncatchable

Build Status Gem Version

Description

Simplified exceptions catcher

Features

  • catch_exception: catch targeted exceptions

  • rescue_exception: catch_exception + sub-exceptions

  • Pure Ruby :)

Usage

```ruby include ExceptionCatchable

p catch_exception(SyntaxError)SyntaxError #=> #<SyntaxError: …> p rescue_exception(Exception)SyntaxError #=> #<SyntaxError: …> p rescue_exceptionSyntaxError #=> #<SyntaxError: …> ```

And see test-case

Requirements

Install

bash $ gem install exceptioncatchable

License

The MIT X11 License
Copyright (c) 2012 Kenichi Kamiya
See MIT-LICENSE for further details.