summaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-26 03:53:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-26 03:53:11 +0000
commitdeaeda8a09eb475853eba0f2cf20dfec278ceea7 (patch)
tree688004538e051b49ba9f6e6fb920cee9b8e4dd0b /error.c
parent4bdc4d19f1d932c10f46bc394fb3af3bd8b6b41c (diff)
downloadruby-deaeda8a09eb475853eba0f2cf20dfec278ceea7.tar.gz
ruby-deaeda8a09eb475853eba0f2cf20dfec278ceea7.tar.xz
ruby-deaeda8a09eb475853eba0f2cf20dfec278ceea7.zip
* error.c (Init_Exception): introduce EncodingError which is a
superclass for all encoding related exception classes, e.g. Encoding::CompatibilityError. [ruby-dev:36371] * transcode.c (Init_transcode): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/error.c b/error.c
index 4782cfa79..be03f94ba 100644
--- a/error.c
+++ b/error.c
@@ -323,6 +323,7 @@ VALUE rb_eIndexError;
VALUE rb_eKeyError;
VALUE rb_eRangeError;
VALUE rb_eNameError;
+VALUE rb_eEncodingError;
VALUE rb_eEncCompatError;
VALUE rb_eNoMethodError;
VALUE rb_eSecurityError;
@@ -1056,7 +1057,8 @@ Init_Exception(void)
rb_eRuntimeError = rb_define_class("RuntimeError", rb_eStandardError);
rb_eSecurityError = rb_define_class("SecurityError", rb_eException);
rb_eNoMemError = rb_define_class("NoMemoryError", rb_eException);
- rb_eEncCompatError = rb_define_class_under(rb_cEncoding, "CompatibilityError", rb_eStandardError);
+ rb_eEncodingError = rb_define_class("EncodingError", rb_eStandardError);
+ rb_eEncCompatError = rb_define_class_under(rb_cEncoding, "CompatibilityError", rb_eEncodingError);
syserr_tbl = st_init_numtable();
rb_eSystemCallError = rb_define_class("SystemCallError", rb_eStandardError);