summaryrefslogtreecommitdiff
path: root/3rdparty/sqlitecpp/source/SQLiteCpp/Exception.h
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-06-27 18:27:13 -0700
committerrtk0c <[email protected]>2022-06-27 18:27:13 -0700
commit8f0dda5eab181b0f14f2652b4e984aaaae3f258c (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /3rdparty/sqlitecpp/source/SQLiteCpp/Exception.h
parentfad6a88a13ab1f888ab25ad0aae19c1d63aa0623 (diff)
Start from a clean slate
Diffstat (limited to '3rdparty/sqlitecpp/source/SQLiteCpp/Exception.h')
-rw-r--r--3rdparty/sqlitecpp/source/SQLiteCpp/Exception.h92
1 files changed, 0 insertions, 92 deletions
diff --git a/3rdparty/sqlitecpp/source/SQLiteCpp/Exception.h b/3rdparty/sqlitecpp/source/SQLiteCpp/Exception.h
deleted file mode 100644
index efd6356..0000000
--- a/3rdparty/sqlitecpp/source/SQLiteCpp/Exception.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * @file Exception.h
- * @ingroup SQLiteCpp
- * @brief Encapsulation of the error message from SQLite3 on a std::runtime_error.
- *
- * Copyright (c) 2012-2021 Sebastien Rombauts ([email protected])
- *
- * Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
- * or copy at http://opensource.org/licenses/MIT)
- */
-#pragma once
-
-#include <stdexcept>
-#include <string>
-
-// Forward declaration to avoid inclusion of <sqlite3.h> in a header
-struct sqlite3;
-
-namespace SQLite
-{
-
-
-/**
- * @brief Encapsulation of the error message from SQLite3, based on std::runtime_error.
- */
-class Exception : public std::runtime_error
-{
-public:
- /**
- * @brief Encapsulation of the error message from SQLite3, based on std::runtime_error.
- *
- * @param[in] aErrorMessage The string message describing the SQLite error
- * @param[in] ret Return value from function call that failed.
- */
- Exception(const char* aErrorMessage, int ret);
-
- Exception(const std::string& aErrorMessage, int ret) :
- Exception(aErrorMessage.c_str(), ret)
- {
- }
-
- /**
- * @brief Encapsulation of the error message from SQLite3, based on std::runtime_error.
- *
- * @param[in] aErrorMessage The string message describing the SQLite error
- */
- explicit Exception(const char* aErrorMessage) :
- Exception(aErrorMessage, -1) // 0 would be SQLITE_OK, which doesn't make sense
- {
- }
- explicit Exception(const std::string& aErrorMessage) :
- Exception(aErrorMessage.c_str(), -1) // 0 would be SQLITE_OK, which doesn't make sense
- {
- }
-
- /**
- * @brief Encapsulation of the error message from SQLite3, based on std::runtime_error.
- *
- * @param[in] apSQLite The SQLite object, to obtain detailed error messages from.
- */
- explicit Exception(sqlite3* apSQLite);
-
- /**
- * @brief Encapsulation of the error message from SQLite3, based on std::runtime_error.
- *
- * @param[in] apSQLite The SQLite object, to obtain detailed error messages from.
- * @param[in] ret Return value from function call that failed.
- */
- Exception(sqlite3* apSQLite, int ret);
-
- /// Return the result code (if any, otherwise -1).
- int getErrorCode() const noexcept
- {
- return mErrcode;
- }
-
- /// Return the extended numeric result code (if any, otherwise -1).
- int getExtendedErrorCode() const noexcept
- {
- return mExtendedErrcode;
- }
-
- /// Return a string, solely based on the error code
- const char* getErrorStr() const noexcept;
-
-private:
- int mErrcode; ///< Error code value
- int mExtendedErrcode; ///< Detailed error code if any
-};
-
-
-} // namespace SQLite