mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* error.c (rb_strerrno): return "UNKNOWNERROR" for non-zero unknown
error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
612c9cd8e3
commit
3861ba9f49
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Nov 24 09:49:31 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* error.c (rb_strerrno): return "UNKNOWNERROR" for non-zero unknown
|
||||
error.
|
||||
|
||||
Tue Nov 24 09:18:33 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* include/ruby/intern.h (rb_strerrno): declared.
|
||||
|
|
3
error.c
3
error.c
|
@ -1261,12 +1261,13 @@ Init_syserr(void)
|
|||
char *
|
||||
rb_strerrno(int err)
|
||||
{
|
||||
if (err == 0) return "NOERROR";
|
||||
#define defined_error(name, num) if (err == num) return name;
|
||||
#define undefined_error(name)
|
||||
#include "known_errors.inc"
|
||||
#undef defined_error
|
||||
#undef undefined_error
|
||||
return "NOERROR";
|
||||
return "UNKNOWNERROR";
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue