Skip to content

Instantly share code, notes, and snippets.

@ichi
Last active September 11, 2016 16:20
Show Gist options
  • Save ichi/6cc917ae0c239dceab1dc7fdbae8f708 to your computer and use it in GitHub Desktop.
Save ichi/6cc917ae0c239dceab1dc7fdbae8f708 to your computer and use it in GitHub Desktop.
class HogeError < StandardError
attr_reader :messages
def initialize(*messages)
@messages = messages
end
end
begin
raise HogeError.new(%w(err1 err2 err3))
rescue => e
puts e.messages
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment