* bin/autfilt.cc: Mention --accepting-word if its argument is bogus.
This commit is contained in:
parent
e018608177
commit
f9e2143a53
1 changed files with 10 additions and 10 deletions
|
|
@ -367,8 +367,16 @@ parse_opt(int key, char* arg, struct argp_state*)
|
||||||
opt_accsets = parse_range(arg, 0, std::numeric_limits<int>::max());
|
opt_accsets = parse_range(arg, 0, std::numeric_limits<int>::max());
|
||||||
break;
|
break;
|
||||||
case OPT_ACC_WORD:
|
case OPT_ACC_WORD:
|
||||||
|
try
|
||||||
|
{
|
||||||
opt->acc_words.push_back(spot::parse_word(arg, opt->dict)
|
opt->acc_words.push_back(spot::parse_word(arg, opt->dict)
|
||||||
->as_automaton());
|
->as_automaton());
|
||||||
|
}
|
||||||
|
catch (const spot::parse_error& e)
|
||||||
|
{
|
||||||
|
error(2, 0, "failed to parse the argument of --accept-word:\n%s",
|
||||||
|
e.what());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case OPT_ARE_ISOMORPHIC:
|
case OPT_ARE_ISOMORPHIC:
|
||||||
opt->are_isomorphic = read_automaton(arg, opt->dict);
|
opt->are_isomorphic = read_automaton(arg, opt->dict);
|
||||||
|
|
@ -829,14 +837,6 @@ main(int argc, char** argv)
|
||||||
if (processor.run())
|
if (processor.run())
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
catch (const spot::parse_error& e)
|
|
||||||
{
|
|
||||||
auto err = e.what();
|
|
||||||
if (strchr(err, '\n'))
|
|
||||||
error(2, 0, "\n%s", err);
|
|
||||||
else
|
|
||||||
error(2, 0, "%s", err);
|
|
||||||
}
|
|
||||||
catch (const std::runtime_error& e)
|
catch (const std::runtime_error& e)
|
||||||
{
|
{
|
||||||
error(2, 0, "%s", e.what());
|
error(2, 0, "%s", e.what());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue