summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authornicm <nicm>2015-11-13 16:06:43 +0000
committernicm <nicm>2015-11-13 16:06:43 +0000
commitc4893d8efdba87843f7f0d8a85c084e1e38d1430 (patch)
treeda0c893255f4cf847ee7780e316d83ee6dea1e21 /options.c
parent88aa1c8dc3962380da8258b3be8fef63b2a2fff2 (diff)
Log option names in fatal() for missing option.
Diffstat (limited to 'options.c')
-rw-r--r--options.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/options.c b/options.c
index 487918fd..8d2fb715 100644
--- a/options.c
+++ b/options.c
@@ -150,9 +150,9 @@ options_get_string(struct options *oo, const char *name)
struct options_entry *o;
if ((o = options_find(oo, name)) == NULL)
- fatalx("missing option");
+ log_fatalx("missing option %s", name);
if (o->type != OPTIONS_STRING)
- fatalx("option not a string");
+ log_fatalx("option %s not a string", name);
return (o->str);
}
@@ -180,9 +180,9 @@ options_get_number(struct options *oo, const char *name)
struct options_entry *o;
if ((o = options_find(oo, name)) == NULL)
- fatalx("missing option");
+ log_fatalx("missing option %s", name);
if (o->type != OPTIONS_NUMBER)
- fatalx("option not a number");
+ log_fatalx("option %s not a number", name);
return (o->num);
}
@@ -220,8 +220,8 @@ options_get_style(struct options *oo, const char *name)
struct options_entry *o;
if ((o = options_find(oo, name)) == NULL)
- fatalx("missing option");
+ log_fatalx("missing option %s", name);
if (o->type != OPTIONS_STYLE)
- fatalx("option not a style");
+ log_fatalx("option %s not a style", name);
return (&o->style);
}