SQLErrMsg.cc
Go to the documentation of this file.
2 
4 
5 extern "C" {
6 #include "sqlite3.h"
7 }
8 
9 void
11 {
12  if (errMsg_) {
14  reset();
15  throw Exception(errors::SQLExecutionError, "SQLite3Wrapper::exec")
16  << "Error executing SQL: " << msg << "\n";
17  }
18 }
19 
20 void
22 {
23  sqlite3_free(errMsg_);
24  errMsg_ = 0;
25 }
26 
28 {
29  reset();
30 }
std::string string
Definition: nybbler.cc:12
void reset()
Definition: SQLErrMsg.cc:21
char * errMsg_
Definition: SQLErrMsg.h:43
std::string msg() const
Definition: SQLErrMsg.h:22
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void throwIfError()
Definition: SQLErrMsg.cc:10