15 qi::error_handler_result
operator()(T1 b, T2 e, T3 where, T4
const& what)
const {
16 auto lineStart = boost::spirit::get_line_start(b, where);
17 auto lineEnd = std::find(where, e,
'\n');
18 std::string line(lineStart, lineEnd);
20 std::stringstream stream;
21 stream <<
"Parsing error at " << get_line(where) <<
":" << boost::spirit::get_column(lineStart, where) <<
": " <<
" expecting " << what <<
", here:\n";
22 stream <<
"\t" << line <<
'\n';
23 auto caretColumn = boost::spirit::get_column(lineStart, where);
24 stream <<
"\t" << std::string(caretColumn - 1,
' ') <<
"^\n";
26 STORM_LOG_THROW(
false, storm::exceptions::WrongFormatException, stream.str());