summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-09-16 17:14:59 +0200
committerMax Kellermann <max@musicpd.org>2016-09-16 17:43:32 +0200
commit0fdaca17a2a84eb915514c1174a49c0647abb6a9 (patch)
tree88ff00e8fea2ab9f4cdfc3a000e7145c8e5272cc /src/input
parent539c0ed171d2482046e7ce46632e803fe3c36b06 (diff)
input/alsa: use C++ exceptions instead of class Error
Diffstat (limited to 'src/input')
-rw-r--r--src/input/plugins/AlsaInputPlugin.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/input/plugins/AlsaInputPlugin.cxx b/src/input/plugins/AlsaInputPlugin.cxx
index 70c6979d5..bc592f568 100644
--- a/src/input/plugins/AlsaInputPlugin.cxx
+++ b/src/input/plugins/AlsaInputPlugin.cxx
@@ -207,10 +207,8 @@ AlsaInputStream::DispatchSockets()
while ((n_frames = snd_pcm_readi(capture_handle,
w.data, w_frames)) < 0) {
if (Recover(n_frames) < 0) {
- Error error;
- error.Format(alsa_input_domain,
- "PCM error - stream aborted");
- PostponeError(std::move(error));
+ postponed_exception = std::make_exception_ptr(std::runtime_error("PCM error - stream aborted"));
+ cond.broadcast();
return;
}
}