aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--error.c32
2 files changed, 37 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ae0e84283..56f81c3355 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Oct 19 11:25:46 2011 Eric Hodel <drbrain@segment7.net>
+
+ * error.c (Init_Exception): Add hierarchy of Exception subclasses.
+ Based on patch by Sylvain Daubert. [Ruby 1.9 - Bug #5438]
+
Wed Oct 19 11:04:47 2011 Eric Hodel <drbrain@segment7.net>
* enum.c: Reformat block args to a single standard, { |args| ... }.
diff --git a/error.c b/error.c
index 8bf33e65ad..f699ea7bdd 100644
--- a/error.c
+++ b/error.c
@@ -1530,6 +1530,38 @@ syserr_eqq(VALUE self, VALUE exc)
* optional traceback information. Programs may subclass
* <code>Exception</code>, or more typically <code>StandardError</code>
* to provide custom classes and add additional information.
+ *
+ * The built-in subclasses of Exception are:
+ *
+ * * NoMemoryError
+ * * ScriptError
+ * * LoadError
+ * * NotImplementedError
+ * * SyntaxError
+ * * SignalException
+ * * Interrupt
+ * * StandardError -- default for +rescue+
+ * * ArgumentError
+ * * IndexError
+ * * StopIteration
+ * * IOError
+ * * EOFError
+ * * LocalJumpError
+ * * NameError
+ * * NoMethodError
+ * * RangeError
+ * * FloatDomainError
+ * * RegexpError
+ * * RuntimeError -- default for +raise+
+ * * SecurityError
+ * * SystemCallError
+ * * Errno::*
+ * * SystemStackError
+ * * ThreadError
+ * * TypeError
+ * * ZeroDivisionError
+ * * SystemExit
+ * * fatal -- impossible to rescue
*/
void