LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
SQLErrMsg.h
Go to the documentation of this file.
1
#ifndef art_Framework_IO_Root_RootDB_SQLErrMsg_h
2
#define art_Framework_IO_Root_RootDB_SQLErrMsg_h
3
4
// Little class to handle the management of an SQLite3 error message.
5
6
// Pass an instance of this class to an SQLite3 function expecting a
7
// char** into which to place an error message.
8
9
#include <string>
10
11
namespace
art
{
12
class
SQLErrMsg;
13
}
14
15
class
art::SQLErrMsg
{
16
public
:
17
SQLErrMsg
() :
errMsg_
(nullptr) {}
18
~SQLErrMsg
();
19
20
// Return the stored message.
21
std::string
22
msg
()
const
23
{
24
return
errMsg_
;
25
}
26
27
// Throw a suitable message if an error occurred.
28
void
throwIfError
();
29
30
// Reset and release memory. This will be done automatically in the
31
// destructor anyway.
32
void
reset
();
33
34
// Enable an object of this class to be passed to functions expecting
35
// char **.
36
operator
char
**()
37
{
38
reset
();
39
return
&
errMsg_
;
40
}
41
42
private
:
43
char
*
errMsg_
;
44
};
45
46
#endif
/* art_Framework_IO_Root_RootDB_SQLErrMsg_h */
47
48
// Local Variables:
49
// mode: c++
50
// End:
art::SQLErrMsg::~SQLErrMsg
~SQLErrMsg()
Definition:
SQLErrMsg.cc:27
art::SQLErrMsg::reset
void reset()
Definition:
SQLErrMsg.cc:21
art::SQLErrMsg::SQLErrMsg
SQLErrMsg()
Definition:
SQLErrMsg.h:17
art::SQLErrMsg::errMsg_
char * errMsg_
Definition:
SQLErrMsg.h:43
art::SQLErrMsg::msg
std::string msg() const
Definition:
SQLErrMsg.h:22
art
HLT enums.
Definition:
ServiceProviderWrappers.h:36
art::SQLErrMsg
Definition:
SQLErrMsg.h:15
art::SQLErrMsg::throwIfError
void throwIfError()
Definition:
SQLErrMsg.cc:10
art
Framework
IO
Root
RootDB
SQLErrMsg.h
Generated on Wed Dec 12 2018 14:42:32 for LArSoft by
1.8.11