LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
SQLErrMsg.cc
Go to the documentation of this file.
1
#include "
art/Framework/IO/Root/RootDB/SQLErrMsg.h
"
2
3
#include "
canvas/Utilities/Exception.h
"
4
5
extern
"C"
{
6
#include "sqlite3.h"
7
}
8
9
void
10
art::SQLErrMsg::throwIfError
()
11
{
12
if
(
errMsg_
) {
13
std::string
msg
(
errMsg_
);
14
reset
();
15
throw
Exception
(
errors::SQLExecutionError
,
"SQLite3Wrapper::exec"
)
16
<<
"Error executing SQL: "
<< msg <<
"\n"
;
17
}
18
}
19
20
void
21
art::SQLErrMsg::reset
()
22
{
23
sqlite3_free(
errMsg_
);
24
errMsg_
= 0;
25
}
26
27
art::SQLErrMsg::~SQLErrMsg
()
28
{
29
reset
();
30
}
art::SQLErrMsg::~SQLErrMsg
~SQLErrMsg()
Definition:
SQLErrMsg.cc:27
art::SQLErrMsg::reset
void reset()
Definition:
SQLErrMsg.cc:21
art::SQLErrMsg::errMsg_
char * errMsg_
Definition:
SQLErrMsg.h:43
art::SQLErrMsg::msg
std::string msg() const
Definition:
SQLErrMsg.h:22
art::Exception
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition:
Exception.h:66
art::errors::SQLExecutionError
Definition:
Exception.h:50
SQLErrMsg.h
art::SQLErrMsg::throwIfError
void throwIfError()
Definition:
SQLErrMsg.cc:10
Exception.h
art
Framework
IO
Root
RootDB
SQLErrMsg.cc
Generated on Thu Jul 26 2018 13:09:41 for LArSoft by
1.8.11