dumping trivial errors to cerr

This commit is contained in:
maroy 2004-11-23 15:39:58 +00:00
parent 8f50a2d109
commit 7a1e167ca9
2 changed files with 13 additions and 5 deletions

View File

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.3 $
Author : $Author: maroy $
Version : $Revision: 1.4 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/PlaylistEvent.cxx,v $
------------------------------------------------------------------------------*/
@ -39,6 +39,8 @@
#error need unistd.h
#endif
#include <iostream>
#include "LiveSupport/Core/TimeConversion.h"
#include "LiveSupport/Core/SessionId.h"
@ -109,6 +111,7 @@ PlaylistEvent :: start(void) throw ()
audioPlayer->playThis(*playlist->getUri());
audioPlayer->start();
} catch (std::invalid_argument &e) {
std::cerr << e.what() << std::endl;
// TODO: handle error?
}
}

View File

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.2 $
Author : $Author: maroy $
Version : $Revision: 1.3 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/PlaylistEventContainerTest.cxx,v $
------------------------------------------------------------------------------*/
@ -156,7 +156,12 @@ PlaylistEventContainerTest :: setUp(void) throw ()
CPPUNIT_FAIL("error parsing configuration file");
}
scheduleFactory->install();
try {
scheduleFactory->install();
} catch (std::exception &e) {
std::cerr << e.what() << std::endl;
CPPUNIT_FAIL("can't install schedule factory");
}
audioPlayer->initialize();
if (!(sessionId = authentication->login("root", "q"))) {