From ffd3018fe7495acace888a1098828978e98f4fdd Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 1 Jun 2016 13:19:40 +0100 Subject: Include parser state on lexer match failure --- gentoobrowse-api/service/utils/lexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3