summaryrefslogtreecommitdiffstats
path: root/parser-mpcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'parser-mpcmd.c')
-rw-r--r--parser-mpcmd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/parser-mpcmd.c b/parser-mpcmd.c
index 112c5fdba8..59b35f0faa 100644
--- a/parser-mpcmd.c
+++ b/parser-mpcmd.c
@@ -192,8 +192,15 @@ play_tree_t *m_config_parse_mp_command_line(m_config_t *config, int argc,
if (r <= M_OPT_EXIT) {
opt_exit = true;
r = M_OPT_EXIT - r;
- } else if (r < 0)
- goto print_err;
+ } else if (r < 0) {
+ char *msg = m_option_strerror(r);
+ if (!msg)
+ goto print_err;
+ mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL,
+ "Error parsing commandline option \"%.*s\": %s\n",
+ BSTR_P(orig_opt), msg);
+ goto err_out;
+ }
if (old_syntax)
i += r;
}