summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-06-01 13:19:40 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-06-01 13:19:40 +0100
commit8b946b25a594f4da1113539ebc263638812bfc16 (patch)
treec10711b6a3463394d012bc549ebde43c91430fd7
parentParallel extract and lookup (diff)
downloadgentoobrowse-api-8b946b25a594f4da1113539ebc263638812bfc16.tar.bz2
gentoobrowse-api-8b946b25a594f4da1113539ebc263638812bfc16.tar.xz
gentoobrowse-api-8b946b25a594f4da1113539ebc263638812bfc16.zip
Include parser state on lexer match failure
-rw-r--r--gentoobrowse-api/service/utils/lexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gentoobrowse-api/service/utils/lexer.cpp b/gentoobrowse-api/service/utils/lexer.cpp
index 8ed83b8..a3352f8 100644
--- a/gentoobrowse-api/service/utils/lexer.cpp
+++ b/gentoobrowse-api/service/utils/lexer.cpp
@@ -94,7 +94,7 @@ namespace Gentoo {
}
}
if (!selected) {
- throw std::runtime_error(std::string("Unexpected input at ") + (string + es.position));
+ throw std::runtime_error(std::string("Unexpected input in state (" + es.getState() + ") at ") + (string + es.position));
}
es.pattern = boost::get<1>(*selected);
const auto & h = boost::get<2>(*selected);