aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/error.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/error.c b/src/error.c
index b4a0138..ad4e3f4 100644
--- a/src/error.c
+++ b/src/error.c
@@ -84,25 +84,19 @@ blogc_error_print(blogc_error_t *err)
if (err == NULL)
return;
- char *tmp = NULL;
-
switch(err->type) {
case BLOGC_ERROR_SOURCE_PARSER:
- tmp = b_strdup("Source parser error");
+ fprintf(stderr, "Source parser error: %s\n", err->msg);
break;
case BLOGC_ERROR_TEMPLATE_PARSER:
- tmp = b_strdup("Template parser error");
+ fprintf(stderr, "Template parser error: %s\n", err->msg);
break;
case BLOGC_ERROR_LOADER:
- tmp = b_strdup("Loader error");
+ fprintf(stderr, "Loader error: %s\n", err->msg);
break;
default:
- tmp = b_strdup("Unknown error");
+ fprintf(stderr, "Unknown error: %s\n", err->msg);
}
-
- fprintf(stderr, "%s: %s\n", tmp, err->msg);
-
- free(tmp);
}