Created
November 19, 2010 00:40
-
-
Save justinko/705960 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 Raise | |
def self.raiser | |
1.join | |
end | |
def self.the_caller | |
raiser | |
rescue => exception | |
raise RuntimeError, "My custom message: #{exception.message}", exception.backtrace | |
end | |
end | |
Raise.the_caller # => RuntimeError: My custom message: undefined method ‘join’ for 1:Fixnum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment