Updated the methods in the scheduler module to use the changed storage client
interface. Re-formatted try-catch blocks everywhere to make them less readable.
This commit is contained in:
parent
0bb6923efd
commit
5c5e8c7de9
59 changed files with 425 additions and 610 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.24 $
|
||||
Version : $Revision: 1.25 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/Playlist.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -145,6 +145,9 @@ Playlist :: Playlist(const Playlist & otherPlaylist)
|
|||
uri = otherPlaylist.uri;
|
||||
token = otherPlaylist.token;
|
||||
|
||||
isLockedForPlaying = otherPlaylist.isLockedForPlaying;
|
||||
isLockedForEditing = otherPlaylist.isLockedForEditing;
|
||||
|
||||
elementList.reset(new PlaylistElementListType(*otherPlaylist.elementList));
|
||||
|
||||
if (otherPlaylist.savedCopy) {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.19 $
|
||||
Version : $Revision: 1.20 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/PlaylistTest.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -205,8 +205,7 @@ PlaylistTest :: audioClipTest(void)
|
|||
// hour, min, sec, frac_sec
|
||||
try {
|
||||
playlist->addAudioClip(audioClip, relativeOffset);
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
} catch (std::invalid_argument &e) {
|
||||
string eMsg = "addAudioClip returned with error: ";
|
||||
eMsg += e.what();
|
||||
CPPUNIT_FAIL(eMsg);
|
||||
|
@ -242,8 +241,7 @@ PlaylistTest :: audioClipTest(void)
|
|||
|
||||
try {
|
||||
playlist->removePlaylistElement(relativeOffset);
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
} catch (std::invalid_argument &e) {
|
||||
string eMsg = "removePlaylistElement returned with error: ";
|
||||
eMsg += e.what();
|
||||
CPPUNIT_FAIL(eMsg);
|
||||
|
@ -264,8 +262,7 @@ PlaylistTest :: audioClipTest(void)
|
|||
playlist->removePlaylistElement(phonyRelativeOffset);
|
||||
CPPUNIT_FAIL("removePlaylistElement allowed to remove "
|
||||
"non-existent audio clip");
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
} catch (std::invalid_argument &e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -280,8 +277,7 @@ PlaylistTest :: savedCopyTest(void)
|
|||
try {
|
||||
playlist->revertToSavedCopy();
|
||||
CPPUNIT_FAIL("allowed to revert to non-existent state");
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
} catch (std::invalid_argument &e) {
|
||||
}
|
||||
|
||||
playlist->createSavedCopy();
|
||||
|
@ -295,8 +291,7 @@ PlaylistTest :: savedCopyTest(void)
|
|||
|
||||
try {
|
||||
playlist->revertToSavedCopy();
|
||||
}
|
||||
catch (std::logic_error &e) {
|
||||
} catch (std::logic_error &e) {
|
||||
CPPUNIT_FAIL("could not revert to saved state");
|
||||
}
|
||||
|
||||
|
@ -318,8 +313,7 @@ PlaylistTest :: savedCopyTest(void)
|
|||
try {
|
||||
playlist->revertToSavedCopy();
|
||||
CPPUNIT_FAIL("allowed to revert to deleted state");
|
||||
}
|
||||
catch (std::logic_error &e) {
|
||||
} catch (std::logic_error &e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -356,16 +350,14 @@ PlaylistTest :: fadeInfoTest(void)
|
|||
Ptr<time_duration>::Ref relativeOffset (new time_duration(0,0,0,0));
|
||||
try {
|
||||
playlist->setFadeInfo(relativeOffset, fadeInfo);
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
} catch (std::invalid_argument &e) {
|
||||
CPPUNIT_FAIL("could not add new fade info");
|
||||
}
|
||||
|
||||
relativeOffset.reset(new time_duration(0,0,11,0));
|
||||
try {
|
||||
playlist->setFadeInfo(relativeOffset, fadeInfo);
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
} catch (std::invalid_argument &e) {
|
||||
CPPUNIT_FAIL("could not update fade info");
|
||||
}
|
||||
|
||||
|
@ -387,8 +379,7 @@ PlaylistTest :: fadeInfoTest(void)
|
|||
try {
|
||||
playlist->setFadeInfo(relativeOffset, fadeInfo);
|
||||
CPPUNIT_FAIL("allowed to set fade info for non-existent element");
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
} catch (std::invalid_argument &e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.1 $
|
||||
Version : $Revision: 1.2 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/XmlRpcToolsTest.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -168,8 +168,7 @@ XmlRpcToolsTest :: firstTest(void)
|
|||
newPlaylistId = XmlRpcTools::extractPlaylistId(xmlRpcPlaylistId);
|
||||
newAudioClipId = XmlRpcTools::extractAudioClipId(xmlRpcPlaylistId);
|
||||
newRelativeOffset = XmlRpcTools::extractRelativeOffset(xmlRpcPlaylistId);
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
} catch (std::invalid_argument &e) {
|
||||
CPPUNIT_FAIL(e.what());
|
||||
}
|
||||
|
||||
|
@ -191,8 +190,7 @@ XmlRpcToolsTest :: errorTest(void)
|
|||
try {
|
||||
XmlRpcTools :: markError(42, "this is an error", xmlRpcValue);
|
||||
CPPUNIT_FAIL("did not throw exception in markError()");
|
||||
}
|
||||
catch (XmlRpc::XmlRpcException &e) {
|
||||
} catch (XmlRpc::XmlRpcException &e) {
|
||||
CPPUNIT_ASSERT(e.getCode() == 42);
|
||||
CPPUNIT_ASSERT(e.getMessage() == "this is an error");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue