summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-01 03:12:21 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-01 03:12:21 +0000
commite4b53b22228d935847b72e8f9ab0f49a15b54215 (patch)
treeae6cd78921bf626d54145b5485474bf59c3dceb4 /error.c
parent005f12582975d8382851b740690f97dba35aaa2a (diff)
2000-02-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/error.c b/error.c
index 7959620..75b57ff 100644
--- a/error.c
+++ b/error.c
@@ -239,16 +239,18 @@ VALUE rb_eSignal;
VALUE rb_eFatal;
VALUE rb_eStandardError;
VALUE rb_eRuntimeError;
-VALUE rb_eSyntaxError;
VALUE rb_eTypeError;
VALUE rb_eArgError;
-VALUE rb_eNameError;
VALUE rb_eIndexError;
-VALUE rb_eLoadError;
VALUE rb_eSecurityError;
VALUE rb_eNotImpError;
VALUE rb_eNoMemError;
+VALUE rb_eScriptError;
+VALUE rb_eNameError;
+VALUE rb_eSyntaxError;
+VALUE rb_eLoadError;
+
VALUE rb_eSystemCallError;
VALUE rb_mErrno;
@@ -533,16 +535,18 @@ Init_Exception()
rb_eSignal = rb_define_class("SignalException", rb_eException);
rb_eStandardError = rb_define_class("StandardError", rb_eException);
- rb_eSyntaxError = rb_define_class("SyntaxError", rb_eStandardError);
rb_eTypeError = rb_define_class("TypeError", rb_eStandardError);
rb_eArgError = rb_define_class("ArgumentError", rb_eStandardError);
- rb_eNameError = rb_define_class("NameError", rb_eStandardError);
rb_eIndexError = rb_define_class("IndexError", rb_eStandardError);
- rb_eLoadError = rb_define_class("LoadError", rb_eStandardError);
+
+ rb_eScriptError = rb_define_class("ScriptError", rb_eException);
+ rb_eSyntaxError = rb_define_class("SyntaxError", rb_eScriptError);
+ rb_eNameError = rb_define_class("NameError", rb_eScriptError);
+ rb_eLoadError = rb_define_class("LoadError", rb_eScriptError);
+ rb_eNotImpError = rb_define_class("NotImplementError", rb_eScriptError);
rb_eRuntimeError = rb_define_class("RuntimeError", rb_eStandardError);
rb_eSecurityError = rb_define_class("SecurityError", rb_eStandardError);
- rb_eNotImpError = rb_define_class("NotImplementError", rb_eException);
rb_eNoMemError = rb_define_class("NoMemoryError", rb_eException);
init_syserr();
@@ -672,6 +676,13 @@ rb_sys_fail(mesg)
rb_exc_raise(ee);
}
+void
+rb_error_frozen(what)
+ char *what;
+{
+ rb_raise(rb_eTypeError, "can't modify frozen %s", what);
+}
+
static void
init_syserr()
{