output/Interface: allow Pause() to throw exception

Coverity discovered that the Pulse plugin could throw exceptions from
Pause(), but that method was marked "noexcept" because its caller was
not designed to catch exceptions.  So instead of avoiding exceptions
(by catching and logging them in each and every implementation), let's
allow them, and do the catch/log game in the MPD core.
This commit is contained in:
Max Kellermann
2017-09-08 14:45:53 +02:00
parent 9cc37bdea2
commit d0f6131ba4
7 changed files with 18 additions and 21 deletions

View File

@@ -103,7 +103,7 @@ public:
std::chrono::steady_clock::duration Delay() const noexcept override;
size_t Play(const void *chunk, size_t size) override;
void Cancel() noexcept override;
bool Pause() noexcept override;
bool Pause() override;
private:
/**
@@ -826,7 +826,7 @@ PulseOutput::Cancel() noexcept
}
bool
PulseOutput::Pause() noexcept
PulseOutput::Pause()
{
assert(mainloop != nullptr);
assert(stream != nullptr);