Files
SQLiteCpp/src/SQLiteC++/Exception.h
Sebastien Rombauts 047cbcf637 Added a SQLite::Exception class based on std::runtime_error
- Using SQLite::Exception instead of std::runtime_error
- Adding exception spec everywhere
- Simplifing the Database constructor parameters to simply use "flags"
2012-03-31 16:29:23 +02:00

35 lines
841 B
C++

/**
* @file Exception.h
* @brief Encapsulation of the error message from SQLite3 on a std::runtime_error.
*
* Copyright (c) 2012 Sebastien Rombauts (sebastien dot rombauts at gmail dot com)
*
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
* or copy at http://opensource.org/licenses/MIT)
*/
#pragma once
#include <stdexcept>
#ifdef _WIN32
#pragma warning(disable:4290) // Disable warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
#endif
namespace SQLite
{
/**
* @brief Encapsulation of the error message from SQLite3, based on std::runtime_error.
*/
class Exception : public std::runtime_error
{
public:
Exception(const std::string& aErrorMessage) :
std::runtime_error(aErrorMessage)
{
}
};
}; // namespace SQLite