aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-10-24 19:53:52 -0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-10-24 19:53:52 -0200
commit22ccecd5caafe80f8670a9cceded41b268d3dda4 (patch)
tree14fc883fcb4ffa98d805088f3c8bdc8cf126fc4b /src/error.c
parentb27251f29dbf35b2580df0586779bc3366cf2dad (diff)
downloadblogc-22ccecd5caafe80f8670a9cceded41b268d3dda4.tar.gz
blogc-22ccecd5caafe80f8670a9cceded41b268d3dda4.tar.bz2
blogc-22ccecd5caafe80f8670a9cceded41b268d3dda4.zip
datetime-parser: improve error handling
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/error.c b/src/error.c
index 0576d34..4cb3be1 100644
--- a/src/error.c
+++ b/src/error.c
@@ -114,19 +114,19 @@ blogc_error_print(blogc_error_t *err)
switch(err->type) {
case BLOGC_ERROR_SOURCE_PARSER:
- fprintf(stderr, "Source parser error: %s\n", err->msg);
+ fprintf(stderr, "blogc: error: source: %s\n", err->msg);
break;
case BLOGC_ERROR_TEMPLATE_PARSER:
- fprintf(stderr, "Template parser error: %s\n", err->msg);
- break;
- case BLOGC_ERROR_DATETIME_PARSER:
- fprintf(stderr, "Datetime parser error: %s\n", err->msg);
+ fprintf(stderr, "blogc: error: template: %s\n", err->msg);
break;
case BLOGC_ERROR_LOADER:
- fprintf(stderr, "Loader error: %s\n", err->msg);
+ fprintf(stderr, "blogc: error: loader: %s\n", err->msg);
+ break;
+ case BLOGC_WARNING_DATETIME_PARSER:
+ fprintf(stderr, "blogc: warning: datetime: %s\n", err->msg);
break;
default:
- fprintf(stderr, "Unknown error: %s\n", err->msg);
+ fprintf(stderr, "blogc: error: %s\n", err->msg);
}
}