Zserio C++ runtime library
1.2.0
Built for Zserio 2.16.0
SqliteException.h
Go to the documentation of this file.
1
#ifndef ZSERIO_SQLITE_EXCEPTION_H_INC
2
#define ZSERIO_SQLITE_EXCEPTION_H_INC
3
4
#include "
zserio/CppRuntimeException.h
"
5
6
#include "sqlite3.h"
7
8
namespace
zserio
9
{
10
12
class
SqliteErrorCode
13
{
14
public
:
20
explicit
SqliteErrorCode
(
int
sqliteCode) :
21
m_code(sqliteCode)
22
{}
23
30
const
char
*
getErrorString
()
const
31
{
32
return
sqlite3_errstr(m_code);
33
}
34
35
private
:
36
int
m_code;
37
};
38
40
class
SqliteException
:
public
CppRuntimeException
41
{
42
public
:
43
using
CppRuntimeException::CppRuntimeException
;
44
};
45
52
inline
CppRuntimeException
&
operator<<
(
CppRuntimeException
& exception,
SqliteErrorCode
code)
53
{
54
return
exception << code.
getErrorString
();
55
}
56
57
}
// namespace zserio
58
59
#endif
// ifndef ZSERIO_SQLITE_EXCEPTION_H_INC
CppRuntimeException.h
zserio::CppRuntimeException
Definition:
CppRuntimeException.h:21
zserio::CppRuntimeException::CppRuntimeException
CppRuntimeException(const char *message="")
Definition:
CppRuntimeException.cpp:10
zserio::SqliteErrorCode
Definition:
SqliteException.h:13
zserio::SqliteErrorCode::SqliteErrorCode
SqliteErrorCode(int sqliteCode)
Definition:
SqliteException.h:20
zserio::SqliteErrorCode::getErrorString
const char * getErrorString() const
Definition:
SqliteException.h:30
zserio::SqliteException
Definition:
SqliteException.h:41
zserio
Definition:
AllocatorHolder.h:7
zserio::operator<<
CppRuntimeException & operator<<(CppRuntimeException &exception, const BasicBitBuffer< ALLOC > &bitBuffer)
Definition:
BitBuffer.h:455
zserio
SqliteException.h
Generated by
1.9.1