File indexing completed on 2025-01-18 09:42:39
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_MYSQL_DETAIL_THROW_ON_ERROR_LOC_HPP
0009 #define BOOST_MYSQL_DETAIL_THROW_ON_ERROR_LOC_HPP
0010
0011 #include <boost/mysql/diagnostics.hpp>
0012 #include <boost/mysql/error_code.hpp>
0013 #include <boost/mysql/error_with_diagnostics.hpp>
0014
0015 #include <boost/assert/source_location.hpp>
0016
0017 namespace boost {
0018 namespace mysql {
0019 namespace detail {
0020
0021 inline void throw_on_error_loc(error_code err, const diagnostics& diag, const boost::source_location& loc)
0022 {
0023 if (err)
0024 {
0025 ::boost::throw_exception(error_with_diagnostics(err, diag), loc);
0026 }
0027 }
0028
0029 }
0030 }
0031 }
0032
0033 #endif