inherit exception for CppSQLite3Exception (#1544)

catch any exception just in case exception isnt inherited from
This commit is contained in:
David Markowitz
2024-04-10 05:32:54 -07:00
committed by GitHub
parent d067a8d12f
commit b8b2b687e2
2 changed files with 6 additions and 1 deletions

View File

@@ -36,10 +36,11 @@
#include "sqlite3.h"
#include <cstdio>
#include <cstring>
#include <exception>
#define CPPSQLITE_ERROR 1000
class CppSQLite3Exception
class CppSQLite3Exception : public std::exception
{
public:
@@ -54,6 +55,8 @@ public:
const int errorCode() { return mnErrCode; }
const char* errorMessage() { return mpszErrMess; }
const char* what() const noexcept override { return mpszErrMess; }
static const char* errorCodeAsString(int nErrCode);