Skip to content

Instantly share code, notes, and snippets.

@dlamichhane
dlamichhane / ruby_exception.rb
Last active March 16, 2018 10:10
Ruby Exception
module Me
LimitException = Class.new(StandardError)
LimitException2 = Class.new(StandardError)
class Sync
def self.find_me(digit)
raise LimitException if digit == 1
raise LimitException2 if digit == 2
puts digit
end