mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-24 14:37:25 +00:00
inherit exception for CppSQLite3Exception (#1544)
catch any exception just in case exception isnt inherited from
This commit is contained in:
parent
d067a8d12f
commit
b8b2b687e2
@ -120,6 +120,8 @@ void CatchUnhandled(int sig) {
|
||||
if (eptr) std::rethrow_exception(eptr);
|
||||
} catch(const std::exception& e) {
|
||||
LOG("Caught exception: '%s'", e.what());
|
||||
} catch (...) {
|
||||
LOG("Caught unknown exception.");
|
||||
}
|
||||
|
||||
#ifndef INCLUDE_BACKTRACE
|
||||
|
5
thirdparty/SQLite/CppSQLite3.h
vendored
5
thirdparty/SQLite/CppSQLite3.h
vendored
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user