/** * @file Exception.h * @ingroup SQLiteCpp * @brief Encapsulation of the error message from SQLite3 on a std::runtime_error. * * Copyright (c) 2012-2013 Sebastien Rombauts (sebastien.rombauts@gmail.com) * * Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt * or copy at http://opensource.org/licenses/MIT) */ #pragma once #include #include 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 */ explicit Exception(const std::string& aErrorMessage) : std::runtime_error(aErrorMessage) { } }; } // namespace SQLite /// Compatibility with non-clang compilers. #ifndef __has_feature #define __has_feature(x) 0 #endif