Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 39d1cebb authored by kraus's avatar kraus
Browse files

give hint where the optimizers expression parser failes

parent 5e89ac7e
No related branches found
No related tags found
No related merge requests found
......@@ -178,8 +178,9 @@ private:
if (!success || iter != end) {
std::cout << "Parsing failed!" << std::endl;
std::string here = (iter != end ? std::string(iter, end): expr_);
throw new OptPilotException("Expression::parse()",
"Parsing failed!");
"Parsing failed here: " + here + "!");
}
// store the functions and variables required to evaluate this
......
......@@ -429,6 +429,9 @@ void OpalSimulation::collectResults() {
} catch(SDDSParserException &e) {
std::cout << "Evaluation of objectives or constraints threw an exception ('" << e.what() << "' in " << e.where() << ")!" << std::endl;
invalidBunch();
} catch(OptPilotException &e) {
std::cout << "Evaluation of objectives or constraints threw an exception ('" << e.what() << "' in " << e.where() << ")!" << std::endl;
invalidBunch();
} catch(...) {
std::cout << "Evaluation of objectives or constraints threw an exception!" << std::endl;
invalidBunch();
......@@ -509,4 +512,4 @@ void OpalSimulation::cleanUp() {
} catch(...) {
std::cout << "Can't remove directory '" << simulationDirName_ << "'" << std::endl;
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment