Zserio C++17 runtime library
1.3.0
Built for Zserio 2.20.0
Loading...
Searching...
No Matches
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
~SqliteException
()
override
;
46
};
47
54
inline
CppRuntimeException
&
operator<<
(
CppRuntimeException
& exception,
SqliteErrorCode
code
)
55
{
56
return
exception <<
code
.getErrorString();
57
}
58
59
}
// namespace zserio
60
61
#endif
// ifndef ZSERIO_SQLITE_EXCEPTION_H_INC
CppRuntimeException.h
zserio::CppRuntimeException
Definition
CppRuntimeException.h:20
zserio::CppRuntimeException::CppRuntimeException
CppRuntimeException(const char *message="")
Definition
CppRuntimeException.cpp:9
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::SqliteException::~SqliteException
~SqliteException() override
zserio::View
Definition
Traits.h:15
zserio
Definition
AllocatorHolder.h:8
zserio::operator<<
CppRuntimeException & operator<<(CppRuntimeException &exception, const BasicBitBuffer< ALLOC > &bitBuffer)
Definition
BitBuffer.h:554
zserio
SqliteException.h
Generated by
1.9.8