Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
MyExceptions = [RangeError, RegexpError, IOError].freeze
raise IOError, "should be rescued"
rescue *MyExceptions => e
puts e

This comment has been minimized.

Copy link
Owner Author

jondkinney commented Feb 1, 2014

To rescue a certain set of exceptions for balanced, instead of just rescuing everything with Exception => e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.