Update last exception moving from worker thread to user thread in async mode

This commit is contained in:
Gabi Melman 2014-11-24 15:02:43 +02:00
parent 87c0770c42
commit 94d2556db6
1 changed files with 2 additions and 3 deletions

View File

@ -181,9 +181,8 @@ inline void spdlog::sinks::async_sink::shutdown(const log_clock::duration& timeo
inline void spdlog::sinks::async_sink::_push_sentry()
{
std::shared_ptr<spdlog_ex> ex_copy = std::move(_last_backthread_ex);
if (ex_copy)
throw *ex_copy;
if (_last_backthread_ex)
throw *std::move(_last_backthread_ex);
if (!_active)
throw(spdlog_ex("async_sink not active"));
}