123456789101112131415161718192021222324252627282930313233 |
- #ifndef BOOST_MYSQL_DETAIL_THROW_ON_ERROR_LOC_HPP
- #define BOOST_MYSQL_DETAIL_THROW_ON_ERROR_LOC_HPP
- #include <boost/mysql/diagnostics.hpp>
- #include <boost/mysql/error_code.hpp>
- #include <boost/mysql/error_with_diagnostics.hpp>
- #include <boost/assert/source_location.hpp>
- namespace boost {
- namespace mysql {
- namespace detail {
- inline void throw_on_error_loc(error_code err, const diagnostics& diag, const source_location& loc)
- {
- if (err)
- {
- ::boost::throw_exception(error_with_diagnostics(err, diag), loc);
- }
- }
- }
- }
- }
- #endif
|