Last active
January 6, 2018 16:42
-
-
Save david50407/4e01b29071c2fa6af2162e9d06f496de 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 AE < StandardError | |
attr_reader :foo, :bar | |
def initialize(a, b= nil) | |
@foo= a | |
@bar= b | |
end | |
end | |
begin | |
raise AE, 'a', 'b' | |
rescue AE => e | |
[e.foo, e.bar, e.message] # ["a", nil, "AE"] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment