Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # begin is just in common decency
- begin
- # Explicit exception call
- raise "A runtime error"
- # Catching exception with optional wrapper ( "=> e" is not required)
- rescue RuntimeError => e
- # Processing error
- puts "There was runtime error: #{e}"
- # Optional ensure block will be executed in any case
- ensure
- puts "Still alive!!!"
- end
Add Comment
Please, Sign In to add comment