diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1998-02-26 12:53:08 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1998-02-26 12:53:08 +0000 |
commit | 900fada82e92a64c1ccc8e502d88565ccd54ceb2 (patch) | |
tree | 6d6805557aa8e93e5a50180676ae60131ce3cb43 /otherlibs/unix/errmsg.c | |
parent | 7c6224f2e3255970dd1ed7959dcff32607ac1e7c (diff) |
Meilleure gestion des erreurs EUNKNOWNERROR
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1881 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix/errmsg.c')
-rw-r--r-- | otherlibs/unix/errmsg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/otherlibs/unix/errmsg.c b/otherlibs/unix/errmsg.c index c802bc3f4..d6aff93bd 100644 --- a/otherlibs/unix/errmsg.c +++ b/otherlibs/unix/errmsg.c @@ -24,7 +24,7 @@ extern char * strerror(int); value unix_error_message(value err) { int errnum; - errnum = error_table[Int_val(err)]; + errnum = Is_block(err) ? Int_val(Field(err, 0)) : error_table[Int_val(err)]; return copy_string(strerror(errnum)); } @@ -36,7 +36,7 @@ extern char *sys_errlist[]; value unix_error_message(value err) { int errnum; - errnum = error_table[Int_val(err)]; + errnum = Is_block(err) ? Int_val(Field(err, 0)) : error_table[Int_val(err)]; if (errnum < 0 || errnum >= sys_nerr) { return copy_string("Unknown error"); } else { |