Commit c0775d32 authored by Max Kellermann's avatar Max Kellermann

output/Filtered: move try/catch from IteratePause() to caller

parent 4ca2c331
......@@ -196,13 +196,7 @@ FilteredAudioOutput::BeginPause() noexcept
}
bool
FilteredAudioOutput::IteratePause() noexcept
FilteredAudioOutput::IteratePause()
{
try {
return output->Pause();
} catch (...) {
FormatError(std::current_exception(), "Failed to pause %s",
GetLogName());
return false;
}
return output->Pause();
}
......@@ -227,7 +227,7 @@ public:
void Cancel() noexcept;
void BeginPause() noexcept;
bool IteratePause() noexcept;
bool IteratePause();
void EndPause() noexcept{
}
......
......@@ -338,10 +338,14 @@ AudioOutputControl::InternalPause(std::unique_lock<Mutex> &lock) noexcept
if (!WaitForDelay(lock))
break;
bool success;
{
bool success = false;
try {
const ScopeUnlock unlock(mutex);
success = output->IteratePause();
} catch (...) {
FormatError(std::current_exception(),
"Failed to pause %s",
GetLogName());
}
if (!success) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment