Handling Errors
Lesson 28Author : 🦒
Last Updated : November, 2017
Code
begin
# puts bad_variable
num = 10/0
rescue ZeroDivisionError
puts "Error"
rescue
puts "All other errors"
end
# or raise an exception
raise "Made Up Exception"