Actually catch the exception?

This commit is contained in:
Alek Mosingiewicz 2018-04-03 18:26:45 +02:00
parent 581561cb88
commit 49edbdc00b

View File

@ -111,6 +111,8 @@ int main()
{ {
std::stringstream ss; std::stringstream ss;
ss << i; ss << i;
try
{
if (chai.eval<int>("getvalue(" + ss.str() + ")") != expected_value(4000)) if (chai.eval<int>("getvalue(" + ss.str() + ")") != expected_value(4000))
{ {
return EXIT_FAILURE; return EXIT_FAILURE;
@ -120,6 +122,11 @@ int main()
{ {
return EXIT_FAILURE; return EXIT_FAILURE;
} }
} catch (chaiscript::exception::eval_error &e) {
std::cout << e.what();
return EXIT_FAILURE;
}
} }
return EXIT_SUCCESS; return EXIT_SUCCESS;