diff options
author | Max Kellermann <max@musicpd.org> | 2017-09-08 14:45:53 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-09-08 14:45:53 +0200 |
commit | d0f6131ba40e8336eb4f62f19f0becc5b4e6cd20 (patch) | |
tree | 1e12fbe2f01ba224032f034fdddebf1dae0cec77 /src/output/Interface.hxx | |
parent | 9cc37bdea2a55ca022c92902f943443badb94bce (diff) |
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.
Diffstat (limited to 'src/output/Interface.hxx')
-rw-r--r-- | src/output/Interface.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/output/Interface.hxx b/src/output/Interface.hxx index 70e47b273..ddc6ffa4b 100644 --- a/src/output/Interface.hxx +++ b/src/output/Interface.hxx @@ -140,8 +140,11 @@ public: * * @return false on error (output will be closed by caller), * true for continue to pause + * + * Instead of returning false, the method may throw an + * exception, which will be logged. */ - virtual bool Pause() noexcept { + virtual bool Pause() { /* fail because this method is not implemented */ return false; } |