Zserio C++17 runtime library  1.1.0
Built for Zserio 2.18.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  ~SqliteException() override;
46 };
47 
55 {
56  return exception << code.getErrorString();
57 }
58 
59 } // namespace zserio
60 
61 #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:553