diff options
author | sc | 2000-11-28 17:07:47 +0000 |
---|---|---|
committer | sc | 2000-11-28 17:07:47 +0000 |
commit | ee937667fd0ecd82faab4c88d756b906fb625f1a (patch) | |
tree | 19e679318b5cb87e8be1a05a7bbc9ba5568d0814 /comm/error.cc | |
parent | 1326b11d65f7020f5f6c691305d2c090b064bd04 (diff) | |
download | ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.zip ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.tar.gz ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.tar.bz2 ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.tar.xz |
Integration into IvyLeague
Uvh -> Ivl
Multiplexer.* is renamed into Scheduler.*
A few name conflicts in the merger with ex-DNN have been solved
Imakefile is replaced by Makefile
Created InetAddress.* and UnixAddress.* from Address.*
Created IrdaAddress.*
OLD/TextStream has been updated
Diffstat (limited to 'comm/error.cc')
-rw-r--r-- | comm/error.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/comm/error.cc b/comm/error.cc index f35725a..9ddc674 100644 --- a/comm/error.cc +++ b/comm/error.cc @@ -23,11 +23,11 @@ extern "C" int rename (const char*, const char*); #include <fcntl.h> #include <stdio.h> #include <sys/file.h> -#include "ccu/Time.h" +#include "ivl/Time.h" #include <sys/types.h> #include <sys/stat.h> -/*?class UchERROR +/*?class IvlERROR The set of global functions described here are designed to handle errors. An error has a type, an origin, and a message. The type defines how the error is handled. @@ -235,7 +235,7 @@ LogMessage (const char* msg) if (! LogOn || LogFd < 0) return; - CcuTimeStamp now; + IvlTimeStamp now; // format of time: Sun Sep 16 01:03:52 1973\n\0 // 123456789012345678901234 LogSize += write (LogFd, now.AsString (), 20); // strip year @@ -343,20 +343,23 @@ SysError (errtype how, const char* who, int exc1, int exc2) { extern int errno; extern int sys_nerr; - extern char* sys_errlist []; - char* msg; + extern const char* const sys_errlist []; + const char* msg; char defmsg [80]; if (! errno || errno == exc1 || errno == exc2) return false; - if (errno >= sys_nerr) - sprintf (msg = defmsg, "system error code %d", errno); - else - if (errno == 0) + if (errno >= sys_nerr) { + sprintf (defmsg, "system error code %d", errno); + msg = defmsg; + + } else if (errno == 0) msg = "internal error"; + else msg = sys_errlist [errno]; + return HandleError (how, who, msg); } |