added the missing mkdir, and added some exception handling which was missing
This commit is contained in:
fgerlits 2006-09-28 12:42:25 +00:00
parent 3eafcb0105
commit 364b35e5b5
4 changed files with 19 additions and 4 deletions

View File

@ -1674,8 +1674,14 @@ WebStorageClient :: acquirePlaylist(Ptr<const UniqueId>::Ref id,
fileName << localTempStorage << std::string(*playlist->getId())
<< "-" << std::rand() << ".smil";
smilDocument->write_to_file_formatted(fileName.str(), "UTF-8");
try {
smilDocument->write_to_file_formatted(fileName.str(), "UTF-8");
} catch (xmlpp::exception &e) {
std::string errorMessage = "could not write the temp file in "
"WebStorageClient::acquirePlaylist: ";
errorMessage += e.what();
throw XmlRpcIOException(errorMessage);
}
Ptr<std::string>::Ref playlistUri(new std::string(fileName.str()));
playlist->setUri(playlistUri);

View File

@ -394,7 +394,9 @@ MasterPanelWindow :: onUpdateTime(int dummy) throw ()
try {
now = gLiveSupport->getScheduler()->getSchedulerTime();
} catch (XmlRpcException &e) {
// TODO: handle error
std::cerr << "Scheduler time is not available; "
<< "switching to local time." << std::endl;
gLiveSupport->checkSchedulerClient();
}
} else {
now = TimeConversion::now();

View File

@ -348,6 +348,7 @@ copy_files:
${MAKE} -C ${EVENT_SCHEDULER_DIR} install
${MKDIR} ${USR_BIN_DIR}
${MKDIR} ${USR_ETC_DIR}
${MKDIR} ${USR_TMP_DIR}
${CP} ${BIN_DIR}/scheduler.sh ${USR_BIN_DIR}
${CP} ${SCHEDULER_EXE} ${USR_BIN_DIR}
${CP} ${ETC_DIR}/odbcinst_debian_template \

View File

@ -100,7 +100,13 @@ PlaylistEvent :: initialize(void) throw (std::exception)
// some ugliness because getPlaylistId() returns a const pointer
Ptr<UniqueId>::Ref playlistId(new UniqueId(scheduleEntry->getPlaylistId()
->getId()));
playlist = storage->acquirePlaylist(sessionId, playlistId);
try {
playlist = storage->acquirePlaylist(sessionId, playlistId);
} catch (Core::XmlRpcException &e) {
std::string errorMessage = "storage server error: ";
errorMessage += e.what();
throw std::logic_error(errorMessage);
}
state = initialized;
}