ltl2tgba, randaut: better error reporting
* src/bin/ltl2tgba.cc, src/bin/randaut.cc: Catch exceptions in main loop. * src/tgbatest/ltl2tgba.test, src/tgbatest/randaut.test: Test errors with unknown --dot argument.
This commit is contained in:
parent
5497bef3d0
commit
4d4c5d807b
4 changed files with 28 additions and 7 deletions
|
|
@ -60,7 +60,7 @@ static const argp_option options[] =
|
|||
/**************************************************/
|
||||
{ "%f", 0, 0, OPTION_DOC | OPTION_NO_USAGE,
|
||||
"the formula, in Spot's syntax", 4 },
|
||||
/**************************************************/
|
||||
/**************************************************/
|
||||
{ 0, 0, 0, 0, "Miscellaneous options:", -1 },
|
||||
{ "extra-options", 'x', "OPTS", 0,
|
||||
"fine-tuning options (see spot-x (7))", 0 },
|
||||
|
|
@ -182,7 +182,14 @@ main(int argc, char** argv)
|
|||
trans.set_level(level);
|
||||
|
||||
trans_processor processor(trans);
|
||||
if (processor.run())
|
||||
return 2;
|
||||
try
|
||||
{
|
||||
if (processor.run())
|
||||
return 2;
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
error(2, 0, "%s", e.what());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -298,8 +298,15 @@ main(int argc, char** argv)
|
|||
|
||||
auto runtime = sw.stop();
|
||||
|
||||
printer.print(aut, nullptr,
|
||||
opt_seed_str, automaton_num, runtime, nullptr);
|
||||
try
|
||||
{
|
||||
printer.print(aut, nullptr,
|
||||
opt_seed_str, automaton_num, runtime, nullptr);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
error(2, 0, "%s", e.what());
|
||||
}
|
||||
|
||||
++automaton_num;
|
||||
if (opt_automata > 0 && automaton_num >= opt_automata)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue