aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/error.c')
-rw-r--r--src/common/error.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/error.c b/src/common/error.c
index a6a5f24..b507e90 100644
--- a/src/common/error.c
+++ b/src/common/error.c
@@ -103,11 +103,14 @@ bc_error_parser(bc_error_type_t type, const char *src, size_t src_len,
// error handling is centralized here for the sake of simplicity :/
void
-bc_error_print(bc_error_t *err)
+bc_error_print(bc_error_t *err, const char *prefix)
{
if (err == NULL)
return;
+ if (prefix != NULL)
+ fprintf(stderr, "%s: ", prefix);
+
switch(err->type) {
case BC_ERROR_CONFIG_PARSER:
fprintf(stderr, "error: config-parser: %s\n", err->msg);