Skip to content

Instantly share code, notes, and snippets.

@justinko
Created November 19, 2010 00:40
Show Gist options
  • Save justinko/705960 to your computer and use it in GitHub Desktop.
Save justinko/705960 to your computer and use it in GitHub Desktop.
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