5#ifndef BOOST_SQLITE_DETAIL_EXCEPTION_HPP
6#define BOOST_SQLITE_DETAIL_EXCEPTION_HPP
8#include <boost/sqlite/detail/config.hpp>
9#include <boost/sqlite/error.hpp>
11BOOST_SQLITE_BEGIN_NAMESPACE
16BOOST_NORETURN
void throw_error_code(
const boost::system::error_code & ec,
17 const boost::source_location & loc = BOOST_CURRENT_LOCATION);
20BOOST_NORETURN
void throw_error_code(
const boost::system::error_code & ec,
21 const error_info & ei,
22 const boost::source_location & loc = BOOST_CURRENT_LOCATION);
25BOOST_NORETURN
void throw_out_of_range(
const char * msg,
26 const boost::source_location & loc);
29BOOST_NORETURN
void throw_invalid_argument(
const char * msg,
30 const boost::source_location & loc);
32inline core::string_view get_message(
const system::system_error & se)
34 auto ec_len = se.code().what().size();
35 auto se_len = std::strlen(se.what());
38 return core::string_view();
40 return core::string_view(se.what(), se_len - (ec_len + 2));
45BOOST_SQLITE_END_NAMESPACE