[前][次][番号順一覧][スレッド一覧]

ruby-changes:32704

From: zzak <ko1@a...>
Date: Sat, 1 Feb 2014 06:31:17 +0900 (JST)
Subject: [ruby-changes:32704] zzak:r44783 (trunk): * error.c: [DOC] Document Exception#cause by @jasonrclark [ci skip]

zzak	2014-02-01 06:31:12 +0900 (Sat, 01 Feb 2014)

  New Revision: 44783

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44783

  Log:
    * error.c: [DOC] Document Exception#cause by @jasonrclark [ci skip]
      [Fixes GH-519] https://github.com/ruby/ruby/pull/519

  Modified files:
    trunk/ChangeLog
    trunk/error.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44782)
+++ ChangeLog	(revision 44783)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Feb  1 06:30:20 2014  Zachary Scott  <e@z...>
+
+	* error.c: [DOC] Document Exception#cause by @jasonrclark [ci skip]
+	  [Fixes GH-519] https://github.com/ruby/ruby/pull/519
+
 Sat Feb  1 06:10:49 2014  Zachary Scott  <e@z...>
 
 	* lib/securerandom.rb: [DOC] Add note on require for examples
Index: error.c
===================================================================
--- error.c	(revision 44782)
+++ error.c	(revision 44783)
@@ -804,6 +804,15 @@ rb_exc_set_backtrace(VALUE exc, VALUE bt https://github.com/ruby/ruby/blob/trunk/error.c#L804
     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)
 {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]