Last active
September 11, 2016 16:20
-
-
Save ichi/6cc917ae0c239dceab1dc7fdbae8f708 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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