Always use our own exception tree

This commit is contained in:
emeric
2018-07-26 10:26:49 +02:00
parent 853bcbe008
commit a31fb3c062
9 changed files with 27 additions and 20 deletions
+2 -4
View File
@@ -20,9 +20,8 @@
#include "SqlQuery.hpp"
#include <algorithm>
#include <cassert>
#include <sstream>
#include <stdexcept>
WhereClause&
WhereClause::And(const WhereClause& otherClause)
@@ -70,8 +69,7 @@ WhereClause::get(void) const
WhereClause&
WhereClause::bind(const std::string& bindArg)
{
if (_bindArgs.size() >= static_cast<std::size_t>( std::count(_clause.begin(), _clause.end(), '?') ))
throw std::runtime_error("Too many bind args!");
assert(_bindArgs.size() < static_cast<std::size_t>(std::count(_clause.begin(), _clause.end(), '?')));
_bindArgs.push_back(bindArg);