summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-11-22 01:09:48 -0500
committermidipix <writeonce@midipix.org>2016-11-10 23:35:26 -0500
commit8f16136058b89e3f1f4c0fad9cad21fe26978483 (patch)
tree7e0aceb70517e16cac9655555a4070e4324099da /src
parent5888e8c839f0aff24d63b5581ed902da47ba36c3 (diff)
downloadperk-8f16136058b89e3f1f4c0fad9cad21fe26978483.tar.bz2
perk-8f16136058b89e3f1f4c0fad9cad21fe26978483.tar.xz
driver integration 5/9: handle internal errors more noisily.
Diffstat (limited to 'src')
-rw-r--r--src/internal/argv/argv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index 0cb3c40..9f570ed 100644
--- a/src/internal/argv/argv.h
+++ b/src/internal/argv/argv.h
@@ -571,7 +571,13 @@ static struct argv_meta * argv_get(
argv_scan(meta->argv,options,&ctx,meta);
if (ctx.errcode != ARGV_ERROR_OK) {
+ if (!ctx.program)
+ ctx.program = argv[0];
+
+ ctx.errcode = ARGV_ERROR_INTERNAL;
+ argv_show_error(&ctx);
argv_free(meta);
+
return 0;
}