Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simplified exceptions catcher
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
lib
test
.gitignore
.travis.yml
.yardopts
Gemfile
MIT-LICENSE
README.md
Rakefile
exceptioncatchable.gemspec

README.md

exceptioncatchable

Build Status Gem Version

Description

Simplified exceptions catcher

Features

  • #catch_exception: catch targeted exceptions
  • #rescue_exception: catch_exception + sub-exceptions
  • Pure Ruby :)

Usage

include ExceptionCatchable

p catch_exception(SyntaxError){raise SyntaxError} #=> #<SyntaxError: ...>
p rescue_exception(Exception){raise SyntaxError}  #=> #<SyntaxError: ...>
p rescue_exception{raise SyntaxError}             #=> #<SyntaxError: ...>

And see test-case

Requirements

Install

$ gem install exceptioncatchable

Link

License

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

Something went wrong with that request. Please try again.