diff options
Diffstat (limited to 'server/src/transactionparser.cc')
-rw-r--r-- | server/src/transactionparser.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/src/transactionparser.cc b/server/src/transactionparser.cc index 7422a13..7595bb2 100644 --- a/server/src/transactionparser.cc +++ b/server/src/transactionparser.cc @@ -72,17 +72,17 @@ void TransactionParser::startTag(std::string name, if(name == "field") { if(!transaction->commits.size()) { PRACRO_ERR(transactionparser, "Field without a commit tag!"); - return; + throw std::exception(); } if(attributes.find("name") == attributes.end()) { PRACRO_ERR(transactionparser, "Field is missing 'name' attribute"); - return; + throw std::exception(); } if(attributes.find("value") == attributes.end()) { PRACRO_ERR(transactionparser, "Field is missing 'value' attribute"); - return; + throw std::exception(); } transaction->commits.back().fields[attributes["name"]] = @@ -101,6 +101,8 @@ void TransactionParser::parseError(const char *buf, size_t len, PRACRO_ERR(transactionparser, "\tBuffer %u bytes: [%s]\n", len, xml.c_str()); + + throw std::exception(); } #ifdef TEST_TRANSACTIONPARSER |