Created
January 1, 2011 14:40
-
-
Save edipofederle/761787 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def simple(n) | |
| raise ArgumentError, "Argumento Invalido" if n < 0 | |
| end | |
| begin | |
| simple(-4) | |
| rescue Exception => e | |
| puts "Dentro do Rescue" | |
| puts "#{e.class}: #{e.message}" | |
| puts $! | |
| puts "Erro em #{$@}" | |
| end | |
| puts "" | |
| puts "Fora do Rescue" | |
| puts $! | |
| puts e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment