Zserio C++ runtime library  1.0.2
Built for Zserio 2.14.1
SqliteException.h
Go to the documentation of this file.
1 #ifndef ZSERIO_SQLITE_EXCEPTION_H_INC
2 #define ZSERIO_SQLITE_EXCEPTION_H_INC
3 
5 
6 #include "sqlite3.h"
7 
8 namespace zserio
9 {
10 
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 
41 {
42 public:
44 };
45 
53 {
54  return exception << code.getErrorString();
55 }
56 
57 } // namespace zserio
58 
59 #endif // ifndef ZSERIO_SQLITE_EXCEPTION_H_INC
CppRuntimeException(const char *message="")
SqliteErrorCode(int sqliteCode)
const char * getErrorString() const
CppRuntimeException & operator<<(CppRuntimeException &exception, const BasicBitBuffer< ALLOC > &bitBuffer)
Definition: BitBuffer.h:455