diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-31 21:31:12 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-31 21:31:12 +0000 |
commit | 16220d9abbb9ef23b0049b63186da8b814f71a37 (patch) | |
tree | 4bdd6b10ef055c34ba00599552ff6f3e6e2c641d /error.c | |
parent | 09c3f84566f4f79c678e9d16417f4dfcf12abba8 (diff) | |
download | ruby-16220d9abbb9ef23b0049b63186da8b814f71a37.tar.gz |
* error.c: [DOC] Document Exception#cause by @jasonrclark [ci skip]
[Fixes GH-519] https://github.com/ruby/ruby/pull/519
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -804,6 +804,15 @@ rb_exc_set_backtrace(VALUE exc, VALUE bt) return exc_set_backtrace(exc, bt); } +/* + * call-seq: + * exception.cause -> an_exception + * + * Returns the previous exception ($!) at the time this exception was raised. + * This is useful for wrapping exceptions and retaining the original exception + * information. + */ + VALUE exc_cause(VALUE exc) { |