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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user