Ruby Raise ArgumenterRor

# raise ArgumentError, 'Put error message here' unless some_condition
# example from source link

def inverse(x)  
  raise ArgumentError, 'Argument is not numeric' unless x.is_a? Numeric  
  1.0 / x  
end  

puts inverse(2) # 0.5
puts inverse('not a number') # ArgumentError
wolf-like_hunter