Zserio C++ runtime library  1.0.0
Built for Zserio 2.13.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 "sqlite3.h"
5 
7 
8 namespace zserio
9 {
10 
13 {
14 public:
20  explicit SqliteErrorCode(int sqliteCode) : m_code(sqliteCode)
21  {}
22 
29  const char* getErrorString() const
30  {
31  return sqlite3_errstr(m_code);
32  }
33 
34 private:
35  int m_code;
36 };
37 
40 {
41 public:
43 };
44 
52 {
53  return exception << code.getErrorString();
54 }
55 
56 } // namespace zserio
57 
58 #endif // ifndef ZSERIO_SQLITE_EXCEPTION_H_INC
SqliteErrorCode(int sqliteCode)
const char * getErrorString() const
CppRuntimeException(const char *message="")
CppRuntimeException & operator<<(CppRuntimeException &exception, const BasicBitBuffer< ALLOC > &bitBuffer)
Definition: BitBuffer.h:432