summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/css/CSSParser.cpp23
-rw-r--r--src/plugins/xml/XmlParser.cpp3
2 files changed, 7 insertions, 19 deletions
diff --git a/src/plugins/css/CSSParser.cpp b/src/plugins/css/CSSParser.cpp
index 00b5af5..85d8858 100644
--- a/src/plugins/css/CSSParser.cpp
+++ b/src/plugins/css/CSSParser.cpp
@@ -135,11 +135,8 @@ void CSSParser::parseSelectors(Rooted<SelectorNode> root,
// as the parseSelector is supposed to parse only a SelectorPath
// there should not be more than one leaf.
throw ParserException{
- "Internal Error: More than one leaf in SelectorPath!", "",
- // TODO: Line handling?
- // tokenizer.getInput().getLine(),
- // tokenizer.getInput().getColumn()
- };
+ "Internal Error: More than one leaf in SelectorPath!",
+ tokenizer.getInput()};
}
// if we find a comma, we can proceed parsing selectors.
Token t;
@@ -301,19 +298,11 @@ bool CSSParser::expect(int expectedType, CodeTokenizer &tokenizer, Token &t,
if (end || t.tokenId != expectedType) {
if (force) {
if (end) {
- throw ParserException{
- "Unexpected end of file!", "",
- // TODO: Line handling?
- // tokenizer.getInput().getLine(),
- // tokenizer.getInput().getColumn()
- };
+ throw ParserException{"Unexpected end of file!",
+ tokenizer.getInput()};
} else {
- throw ParserException{
- "Unexpected token!", "",
- // TODO: Line handling?
- // tokenizer.getInput().getLine(),
- // tokenizer.getInput().getColumn()
- };
+ throw ParserException{"Unexpected token!",
+ tokenizer.getInput()};
}
} else {
tokenizer.resetPeek();
diff --git a/src/plugins/xml/XmlParser.cpp b/src/plugins/xml/XmlParser.cpp
index afc7f14..ce2857e 100644
--- a/src/plugins/xml/XmlParser.cpp
+++ b/src/plugins/xml/XmlParser.cpp
@@ -208,8 +208,7 @@ Rooted<Node> XmlParser::parse(std::istream &is, ParserContext &ctx)
const int column = XML_GetCurrentColumnNumber(&p);
const XML_Error code = XML_GetErrorCode(&p);
const std::string msg = std::string{XML_ErrorString(code)};
- throw ParserException{"XML Syntax Error: " + msg, line, column,
- false};
+ throw ParserException{"XML Syntax Error: " + msg, line, column};
}
// Abort once there are no more bytes in the stream