Prepend the Engine::errorString to debug messages, too (it should probably be renamed to reflect this...)

svn-id: r24712
This commit is contained in:
Max Horn 2006-11-13 20:56:11 +00:00
parent df2ccb78c2
commit 86d988132c

View File

@ -361,7 +361,16 @@ int gDebugLevel = -1;
static void debugHelper(char *buf, bool caret = true) {
static void debugHelper(const char *in_buf, bool caret = true) {
char buf[STRINGBUFLEN];
// Next, give the active engine (if any) a chance to augment the message
if (g_engine) {
g_engine->errorString(in_buf, buf);
} else {
strcpy(buf, in_buf);
}
#ifndef _WIN32_WCE
if (caret)
printf("%s\n", buf);
@ -448,8 +457,7 @@ void NORETURN CDECL error(const char *s, ...) {
va_end(va);
// Next, give the active engine (if any) a chance to augment the
// error message
// Next, give the active engine (if any) a chance to augment the message
if (g_engine) {
g_engine->errorString(buf_input, buf_output);
} else {