made scheduled event more fault tolerant
This commit is contained in:
parent
db4f5da722
commit
9848eefbe7
1 changed files with 15 additions and 4 deletions
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: maroy $
|
||||||
Version : $Revision: 1.8 $
|
Version : $Revision: 1.9 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/PlaylistEvent.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/PlaylistEvent.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -116,7 +116,12 @@ PlaylistEvent :: deInitialize(void) throw ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
storage->releasePlaylist(sessionId, playlist);
|
storage->releasePlaylist(sessionId, playlist);
|
||||||
|
} catch (XmlRpcException &e) {
|
||||||
|
std::cerr << e.what() << std::endl;
|
||||||
|
// TODO: handle error?
|
||||||
|
}
|
||||||
playlist.reset();
|
playlist.reset();
|
||||||
state = deInitialized;
|
state = deInitialized;
|
||||||
}
|
}
|
||||||
|
@ -157,8 +162,14 @@ PlaylistEvent :: stop(void) throw ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
audioPlayer->stop();
|
audioPlayer->stop();
|
||||||
audioPlayer->close();
|
audioPlayer->close();
|
||||||
|
} catch (std::logic_error &e) {
|
||||||
|
// TODO: handle error
|
||||||
|
std::cerr << "PlaylistEvent::stop error: " << std::endl;
|
||||||
|
std::cerr << e.what() << std::endl;
|
||||||
|
}
|
||||||
state = stopped;
|
state = stopped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue