aboutsummaryrefslogtreecommitdiff
path: root/src/sqlitepp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sqlitepp.cpp')
-rw-r--r--src/sqlitepp.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sqlitepp.cpp b/src/sqlitepp.cpp
index fc14f63..10315e5 100644
--- a/src/sqlitepp.cpp
+++ b/src/sqlitepp.cpp
@@ -143,11 +143,13 @@ int Statement::getParameterIndex(const std::string& name) const {
}
void Statement::handleBindResult(const int index, const int result) const {
+ std::ostringstream s;
switch (result) {
case SQLITE_OK:
break;
case SQLITE_RANGE:
- throw std::out_of_range("Bind index out of range: " + index);
+ s << "Bind index out of range: " << index;
+ throw std::out_of_range(s.str());
case SQLITE_NOMEM:
throw std::runtime_error("No memory to bind parameter");
default: