diff --git a/olp-cpp-sdk-core/src/utils/BoostExceptionHandle.cpp b/olp-cpp-sdk-core/src/utils/BoostExceptionHandle.cpp index d1b860696..c38fcad80 100644 --- a/olp-cpp-sdk-core/src/utils/BoostExceptionHandle.cpp +++ b/olp-cpp-sdk-core/src/utils/BoostExceptionHandle.cpp @@ -26,6 +26,8 @@ #include #include +#include + namespace { constexpr auto kLogTag = "BoostExceptionHandle"; } @@ -36,5 +38,13 @@ OLP_CPP_SDK_DECL_EXPORT void throw_exception(const std::exception& e) { OLP_SDK_LOG_ABORT_F(kLogTag, "Exception occurred: '%s'", e.what()); } +#if BOOST_VERSION >= 107300 +OLP_CPP_SDK_DECL_EXPORT void throw_exception( + const std::exception& e, boost::source_location const& loc) { + OLP_SDK_LOG_ABORT_F(kLogTag, "Exception occurred: '%s' location: '%s'", + e.what(), loc.to_string().c_str()); +} +#endif + } // namespace boost #endif