pike.git/
src/
error.c
Branch:
Tag:
Non-build tags
All tags
No tags
2004-11-11
2004-11-11 16:10:44 by Henrik Grubbström (Grubba) <grubba@grubba.org>
564e33882e6e3a4aa7abafc6c045bf54405a11c0 (
16
lines) (+
9
/-
7
)
[
Show
|
Annotate
]
Branch:
7.9
generic_error_va() now also uses string_builder_vsprintf().
Rev: src/error.c:1.140
2:
|| This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: error.c,v 1.
139
2004/11/11 16:
03
:
54
grubba Exp $
+
|| $Id: error.c,v 1.
140
2004/11/11 16:
10
:
44
grubba Exp $
*/ #define NO_PIKE_SHORTHAND
820:
va_list foo) ATTRIBUTE((noreturn)) {
-
char
buf[8192]
;
+
struct
string_builder s
;
int i;
-
VSNPRINTF(buf, sizeof(buf), fmt, foo);
-
+
if(in_error) { const char *tmp=in_error; in_error=0; Pike_fatal("Recursive error() calls, original error: %s",tmp); }
-
in_error=buf;
+
-
+
in_error = fmt;
+
init_string_builder(&s, 0);
+
string_builder_vsprintf(&s, fmt, foo);
+
#if 0 if (!master_program) {
-
fprintf(stderr, "ERROR: %s\n",
buf
);
+
fprintf(stderr, "ERROR: %s\n",
s.s->str
);
} #endif
-
ERROR_STRUCT(generic,o)->error_message=
make
_
shared_
string(
buf
);
+
ERROR_STRUCT(generic,o)->error_message
=
finish
_
string
_
builder
(
&s
);
f_backtrace(0); if(func)