From 3db4168db1c91aef1d02189fc22a368bc0dd917e Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 7 Feb 2007 16:38:46 +0000 Subject: [PATCH] Throw a runtime error when a bad audio device is selected, so that the GUI can process the error message. refer to #2165 --- .../src/modules/playlistExecutor/src/GstreamerPlayer.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/campcaster/src/modules/playlistExecutor/src/GstreamerPlayer.cxx b/campcaster/src/modules/playlistExecutor/src/GstreamerPlayer.cxx index ed100e425..a07c1ca52 100644 --- a/campcaster/src/modules/playlistExecutor/src/GstreamerPlayer.cxx +++ b/campcaster/src/modules/playlistExecutor/src/GstreamerPlayer.cxx @@ -143,11 +143,14 @@ GstreamerPlayer :: errorHandler(GstElement * pipeline, gpointer self) throw () { - std::cerr << "gstreamer error: " << error->message << std::endl; - // Important: We *must* use an idle function call here, so that the signal handler returns // before fireOnStopEvent() is executed. g_idle_add(fireOnStopEvent, self); + + std::string str( "Audio Player Error: "); + str += error->message; + + throw std::runtime_error(str); }