Changeset: 52468ef1516e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/52468ef1516e
Modified Files:
gdk/gdk_tracer.c
monetdb5/mal/mal_exception.c
Branch: Jun2023
Log Message:
Server exiting is not an error.
diffs (50 lines):
diff --git a/gdk/gdk_tracer.c b/gdk/gdk_tracer.c
--- a/gdk/gdk_tracer.c
+++ b/gdk/gdk_tracer.c
@@ -513,6 +513,7 @@ GDKtracer_log(const char *file, const ch
va_list va;
char ts[TS_SIZE];
char *msg = NULL;
+ bool isexit;
static char file_prefix[] = __FILE__;
static size_t prefix_length = (size_t) -1;
@@ -550,6 +551,7 @@ GDKtracer_log(const char *file, const ch
sizeof(buffer) - bytes_written,
fmt, va);
}
+ isexit = strstr(msg, EXITING_MSG) != NULL;
va_end(va);
if (bytes_written < 0) {
if ((adapter_t) ATOMIC_GET(&cur_adapter) != MBEDDED)
@@ -567,7 +569,8 @@ GDKtracer_log(const char *file, const ch
size_t n = strlen(buf);
snprintf(buf + n, GDKMAXERRLEN - n,
"%s%s: %s%s%s\n",
- GDKERROR, func, msg,
+ isexit ? "" : GDKERROR,
+ func, msg,
syserr ? ": " : "",
syserr ? syserr : "");
}
@@ -582,7 +585,7 @@ GDKtracer_log(const char *file, const ch
reinit();
if (level <= M_WARNING || (ATOMIC_GET(&GDKdebug) & FORCEMITOMASK)) {
- fprintf(level <= M_ERROR ? stderr : stdout,
+ fprintf(level <= M_ERROR && !isexit ? stderr : stdout,
"#%s%s%s: %s: %s: %s%s%s\n",
add_ts ? ts : "",
add_ts ? ": " : "",
diff --git a/monetdb5/mal/mal_exception.c b/monetdb5/mal/mal_exception.c
--- a/monetdb5/mal/mal_exception.c
+++ b/monetdb5/mal/mal_exception.c
@@ -159,7 +159,7 @@ createException(enum malexception type,
ret = createException(type, fcn, "%s", q + 2);
}
if (ret == NULL)
- ret = createException(type, fcn, "GDK reported error:
%s", p);
+ ret = createException(type, fcn, "GDK reported%s: %s",
strstr(p, EXITING_MSG) == NULL ? " error" : "", p);
GDKclrerr();
assert(ret);
return ret;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]