Skip to content

Instantly share code, notes, and snippets.

@oozzal
Created July 6, 2013 13:31
Show Gist options
  • Save oozzal/5939893 to your computer and use it in GitHub Desktop.
Save oozzal/5939893 to your computer and use it in GitHub Desktop.
class MyException < Exception
end
class YourException < Exception
end
begin
raise MyException if 2 > 50
raise YourException if 1 < 90
rescue MyException
puts "MyException Caught"
rescue Exception
puts "Other Exceptions Caught"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment