Ruby - Programming Language
This course covers the basics of programming in Ruby. Work your way through the videos/articles and I'll teach you everything you need to know to start your programming journey!

Handling Errors

Lesson 28
Author : GOUP
Last Updated : September, 2020


Code

Copybegin
     # puts bad_variable
     num = 10/0
rescue ZeroDivisionError
     puts "Error"
rescue
     puts "All other errors"
end

# or raise an exception

raise "Made Up Exception"