diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-10-02 20:55:04 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-10-02 20:55:04 +0200 |
commit | 93cd8acc739314d37075082c1272f88bbdebe81b (patch) | |
tree | f4070ef6bc8aafd0fd8200121ad62eea85e13257 | |
parent | 459d6f199a8e0866a4619826cadae9a23b9efa30 (diff) |
lib: tweak error context formatting
Do not emit additional newline when formatting error context and print it
instead when outputting the exception.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | lib.c | 2 | ||||
-rw-r--r-- | main.c | 2 |
2 files changed, 1 insertions, 3 deletions
@@ -125,8 +125,6 @@ format_error_context(char **msg, size_t *msglen, const char *path, const char *e sprintf_append(msg, msglen, "^\n"); } - - sprintf_append(msg, msglen, "\n"); } char * @@ -177,7 +177,7 @@ parse(struct ut_state *state, const char *source, bool dumponly, if (err) { msg = ut_format_error(state, source); - fprintf(stderr, "%s\n", msg); + fprintf(stderr, "%s\n\n", msg); free(msg); } |