mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* error.c (exc_exception, {exit,name_err,syserr}_initialize): call
Execption#initialize. fixed: [ruby-talk:142593] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
642ddf7201
commit
36e3983a27
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat May 14 23:59:11 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* error.c (exc_exception, {exit,name_err,syserr}_initialize): call
|
||||||
|
Execption#initialize. fixed: [ruby-talk:142593]
|
||||||
|
|
||||||
Sat May 14 23:56:41 2005 Erik Huelsmann <ehuels@gmail.com>
|
Sat May 14 23:56:41 2005 Erik Huelsmann <ehuels@gmail.com>
|
||||||
|
|
||||||
* configure.in: Check for the availability of pid_t, gid_t and uid_t and
|
* configure.in: Check for the availability of pid_t, gid_t and uid_t and
|
||||||
|
|
8
error.c
8
error.c
|
@ -386,7 +386,7 @@ exc_exception(argc, argv, self)
|
||||||
if (argc == 0) return self;
|
if (argc == 0) return self;
|
||||||
if (argc == 1 && self == argv[0]) return self;
|
if (argc == 1 && self == argv[0]) return self;
|
||||||
exc = rb_obj_clone(self);
|
exc = rb_obj_clone(self);
|
||||||
exc_initialize(argc, argv, exc);
|
rb_obj_call_init(exc, argc, argv);
|
||||||
|
|
||||||
return exc;
|
return exc;
|
||||||
}
|
}
|
||||||
|
@ -580,7 +580,7 @@ exit_initialize(argc, argv, exc)
|
||||||
status = *argv++;
|
status = *argv++;
|
||||||
--argc;
|
--argc;
|
||||||
}
|
}
|
||||||
exc_initialize(argc, argv, exc);
|
rb_call_super(argc, argv);
|
||||||
rb_iv_set(exc, "status", status);
|
rb_iv_set(exc, "status", status);
|
||||||
return exc;
|
return exc;
|
||||||
}
|
}
|
||||||
|
@ -660,7 +660,7 @@ name_err_initialize(argc, argv, self)
|
||||||
VALUE name;
|
VALUE name;
|
||||||
|
|
||||||
name = (argc > 1) ? argv[--argc] : Qnil;
|
name = (argc > 1) ? argv[--argc] : Qnil;
|
||||||
exc_initialize(argc, argv, self);
|
rb_call_super(argc, argv);
|
||||||
rb_iv_set(self, "name", name);
|
rb_iv_set(self, "name", name);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -965,7 +965,7 @@ syserr_initialize(argc, argv, self)
|
||||||
else {
|
else {
|
||||||
mesg = rb_str_new2(err);
|
mesg = rb_str_new2(err);
|
||||||
}
|
}
|
||||||
exc_initialize(1, &mesg, self);
|
rb_call_super(1, &mesg);
|
||||||
rb_iv_set(self, "errno", error);
|
rb_iv_set(self, "errno", error);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue