Put exception handling back into plasp binary for convenient use.
This commit is contained in:
parent
34a413cf05
commit
f6cfc55e21
@ -62,6 +62,8 @@ int main(int argc, char **argv)
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
plasp::utils::Parser parser;
|
||||
|
||||
parser.setCaseSensitive(false);
|
||||
@ -107,6 +109,13 @@ int main(int argc, char **argv)
|
||||
const auto sasTranslator = plasp::sas::TranslatorASP(sasDescription);
|
||||
sasTranslator.translate(std::cout);
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << "Error: " << e.what() << std::endl << std::endl;
|
||||
printHelp();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user