2012-04-18

How to specify a default message for a Ruby custom exception

class MyException < StandardError
  def initialize(message = 'My custom error message')
    super
  end
end

No comments: