Disambiguation of parser and translation errors in plasp binary.
This commit is contained in:
parent
0513b3aa0c
commit
318bd8297c
@ -9,6 +9,7 @@
|
||||
#include <plasp/pddl/TranslatorASP.h>
|
||||
#include <plasp/sas/Description.h>
|
||||
#include <plasp/sas/TranslatorASP.h>
|
||||
#include <plasp/utils/TranslatorException.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@ -115,6 +116,18 @@ int main(int argc, char **argv)
|
||||
translator.translate(std::cout);
|
||||
}
|
||||
}
|
||||
catch (const plasp::utils::ParserException &e)
|
||||
{
|
||||
std::cerr << "Parser error: " << e.what() << std::endl << std::endl;
|
||||
printHelp();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
catch (const plasp::utils::TranslatorException &e)
|
||||
{
|
||||
std::cerr << "Translation error: " << e.what() << std::endl << std::endl;
|
||||
printHelp();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << "Error: " << e.what() << std::endl << std::endl;
|
||||
|
Reference in New Issue
Block a user