Handling Errors
Lesson 28Author : GOUP
Last Updated : September, 2020
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"