Changeset: 7206c7213976 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7206c7213976
Modified Files:
gdk/gdk_utils.c
monetdb5/mal/mal_exception.c
Branch: Apr2019
Log Message:
Log errors that occur during processing.
In addition to reporting errors back to the client (often throwing
away information from the lower levels), we now log (write to stderr)
all errors at GDK and MAL level as they occur. We do not (yet?) do
the same with SQL errors since there are too many during normal
processing (e.g. seeing which of the tables in a query has a
particular column/alias -- these are not errors, but use the error
mechanism).
diffs (31 lines):
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -987,10 +987,9 @@ doGDKaddbuf(const char *prefix, const ch
dst += sufflen;
}
*dst = '\0';
- } else {
- THRprintf(GDKout, "%s%.*s%s", prefix ? prefix : "",
- (int) messagelen, message, suffix ? suffix : "");
}
+ fprintf(stderr, "%s%.*s%s", prefix ? prefix : "",
+ (int) messagelen, message, suffix ? suffix : "");
}
/* print an error or warning message, making sure the message ends in
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
@@ -79,6 +79,11 @@ createExceptionInternal(enum malexceptio
if (newmsg != NULL)
message = newmsg;
}
+ char *q = message;
+ for (char *p = strchr(q, '\n'); p; q = p + 1, p = strchr(q, '\n'))
+ fprintf(stderr, "#!ERROR:%.*s\n", (int) (p - q), q);
+ if (*q)
+ fprintf(stderr, "#!ERROR:%s\n", q);
return message;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list