fixing #1823;
added the missing mkdir, and added some exception handling which was missing
This commit is contained in:
parent
3eafcb0105
commit
364b35e5b5
4 changed files with 19 additions and 4 deletions
|
@ -1674,8 +1674,14 @@ WebStorageClient :: acquirePlaylist(Ptr<const UniqueId>::Ref id,
|
||||||
fileName << localTempStorage << std::string(*playlist->getId())
|
fileName << localTempStorage << std::string(*playlist->getId())
|
||||||
<< "-" << std::rand() << ".smil";
|
<< "-" << 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()));
|
Ptr<std::string>::Ref playlistUri(new std::string(fileName.str()));
|
||||||
playlist->setUri(playlistUri);
|
playlist->setUri(playlistUri);
|
||||||
|
|
||||||
|
|
|
@ -394,7 +394,9 @@ MasterPanelWindow :: onUpdateTime(int dummy) throw ()
|
||||||
try {
|
try {
|
||||||
now = gLiveSupport->getScheduler()->getSchedulerTime();
|
now = gLiveSupport->getScheduler()->getSchedulerTime();
|
||||||
} catch (XmlRpcException &e) {
|
} catch (XmlRpcException &e) {
|
||||||
// TODO: handle error
|
std::cerr << "Scheduler time is not available; "
|
||||||
|
<< "switching to local time." << std::endl;
|
||||||
|
gLiveSupport->checkSchedulerClient();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
now = TimeConversion::now();
|
now = TimeConversion::now();
|
||||||
|
|
|
@ -348,6 +348,7 @@ copy_files:
|
||||||
${MAKE} -C ${EVENT_SCHEDULER_DIR} install
|
${MAKE} -C ${EVENT_SCHEDULER_DIR} install
|
||||||
${MKDIR} ${USR_BIN_DIR}
|
${MKDIR} ${USR_BIN_DIR}
|
||||||
${MKDIR} ${USR_ETC_DIR}
|
${MKDIR} ${USR_ETC_DIR}
|
||||||
|
${MKDIR} ${USR_TMP_DIR}
|
||||||
${CP} ${BIN_DIR}/scheduler.sh ${USR_BIN_DIR}
|
${CP} ${BIN_DIR}/scheduler.sh ${USR_BIN_DIR}
|
||||||
${CP} ${SCHEDULER_EXE} ${USR_BIN_DIR}
|
${CP} ${SCHEDULER_EXE} ${USR_BIN_DIR}
|
||||||
${CP} ${ETC_DIR}/odbcinst_debian_template \
|
${CP} ${ETC_DIR}/odbcinst_debian_template \
|
||||||
|
|
|
@ -100,7 +100,13 @@ PlaylistEvent :: initialize(void) throw (std::exception)
|
||||||
// some ugliness because getPlaylistId() returns a const pointer
|
// some ugliness because getPlaylistId() returns a const pointer
|
||||||
Ptr<UniqueId>::Ref playlistId(new UniqueId(scheduleEntry->getPlaylistId()
|
Ptr<UniqueId>::Ref playlistId(new UniqueId(scheduleEntry->getPlaylistId()
|
||||||
->getId()));
|
->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;
|
state = initialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue