Skip to content

Instantly share code, notes, and snippets.

@julioterra
Created October 3, 2011 06:04
Show Gist options
  • Select an option

  • Save julioterra/1258532 to your computer and use it in GitHub Desktop.

Select an option

Save julioterra/1258532 to your computer and use it in GitHub Desktop.
exception rescue
begin
x = 5
if x < 10 then raise ArgumentError, "exception raised #{x} is too small" end
rescue ArgumentError
puts "exception rescued, but #{x} is still too small"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment