summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-11-13 16:06:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-11-13 16:06:44 +0000
commit0d8e720e0e2f5d5ef1414d6939ade9d464350ede (patch)
treecef9537df785d88c75a4b34fd18642b33180094c
parent7ccbb729fa6f83fe64d43f4a1c6bf4fed766d7be (diff)
Log option names in fatal() for missing option.
-rw-r--r--usr.bin/tmux/options.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/tmux/options.c b/usr.bin/tmux/options.c
index 59494c12985..eb622e0f4ec 100644
--- a/usr.bin/tmux/options.c
+++ b/usr.bin/tmux/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.13 2015/10/27 15:58:42 nicm Exp $ */
+/* $OpenBSD: options.c,v 1.14 2015/11/13 16:06:43 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);
}