summaryrefslogtreecommitdiffstats
path: root/src/sources/soundsource.cpp
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2016-06-22 22:50:37 +0200
committerDaniel Schürmann <daschuer@mixxx.org>2016-06-22 22:50:37 +0200
commit6cf0cf56bdb12a9014a64ab743abc1bb960b6fb8 (patch)
treea74151af142e8315c7946290ebd0fc21713a31c9 /src/sources/soundsource.cpp
parent9311c339ad5b871ea30fa96e3f7451de502f2cc3 (diff)
improve exception handling in SoundSource::open
Diffstat (limited to 'src/sources/soundsource.cpp')
-rw-r--r--src/sources/soundsource.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sources/soundsource.cpp b/src/sources/soundsource.cpp
index 2400fd9268..29a538a452 100644
--- a/src/sources/soundsource.cpp
+++ b/src/sources/soundsource.cpp
@@ -26,10 +26,12 @@ SoundSource::OpenResult SoundSource::open(const AudioSourceConfig& audioSrcCfg)
OpenResult result;
try {
result = tryOpen(audioSrcCfg);
- } catch (...) {
+ } catch (const std::exception& e) {
+ qWarning() << "tryOpen failed" << getLocalFileName() << e.what();
close();
- throw;
+ return OpenResult::FAILED;
}
+
if (OpenResult::SUCCEEDED != result) {
close();
}