Roxen.git/
server/
base_server/
roxen.pike
Branch:
Tag:
Non-build tags
All tags
No tags
1997-06-09
1997-06-09 21:47:31 by Henrik Grubbström (Grubba) <grubba@grubba.org>
ec2fe1394006b3b165af9adcb33e3e1ae20df025 (
15
lines) (+
5
/-
10
)
[
Show
|
Annotate
]
Branch:
5.2
Added posibility to read the last error.
Rev: server/base_server/roxen.pike:1.70
1:
-
string cvs_version = "$Id: roxen.pike,v 1.
69
1997/06/
06
16
:
52
:
24
grubba Exp $";
+
string cvs_version = "$Id: roxen.pike,v 1.
70
1997/06/
09
21
:
47
:
31
grubba Exp $";
#define IN_ROXEN #ifdef THREADS #include <fifo.h>
391:
mapping(string:array(int)) error_log=([]);
+
string last_error="";
+
// Write a string to the configuration interface error log and to stderr. void nwrite(string s, int|void perr) {
-
#if
0
-
if(root && root->descend("Errors", 1))
-
{
-
mapping e
=
root->descend("Errors", 1)->data;
-
if(!e[
s
]) e[s]=({ time(1) })
;
-
else e[s] += ({ time(1) });
-
}
-
#else
+
last_error
= s;
if (!error_log[s]) { error_log[s] = ({ time(1) }); } else { error_log[s] += ({ time(1) }); }
-
#endif /* 0 */
+
roxen_perror(s); }