diff --git a/livesupport/modules/core/etc/Makefile.in b/livesupport/modules/core/etc/Makefile.in index 33477227f..505e1ba19 100644 --- a/livesupport/modules/core/etc/Makefile.in +++ b/livesupport/modules/core/etc/Makefile.in @@ -20,8 +20,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # -# Author : $Author: fgerlits $ -# Version : $Revision: 1.21 $ +# Author : $Author: maroy $ +# Version : $Revision: 1.22 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/etc/Makefile.in,v $ # # @configure_input@ @@ -118,7 +118,8 @@ CORE_LIB_OBJS = ${TMP_DIR}/UniqueId.o \ ${TMP_DIR}/LocalizedObject.o \ ${TMP_DIR}/LocalizedConfigurable.o \ ${TMP_DIR}/Md5.o \ - ${TMP_DIR}/XmlRpcTools.o + ${TMP_DIR}/XmlRpcTools.o \ + ${TMP_DIR}/XmlRpcException.o TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \ ${TMP_DIR}/UniqueIdTest.o \ diff --git a/livesupport/modules/core/include/LiveSupport/Core/XmlRpcCommunicationException.h b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcCommunicationException.h new file mode 100644 index 000000000..2b2f7bb19 --- /dev/null +++ b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcCommunicationException.h @@ -0,0 +1,120 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: maroy $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/XmlRpcCommunicationException.h,v $ + +------------------------------------------------------------------------------*/ +#ifndef LiveSupport_Core_XmlRpcCommunicationException_h +#define LiveSupport_Core_XmlRpcCommunicationException_h + +#ifndef __cplusplus +#error This is a C++ include file +#endif + + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include "LiveSupport/Core/XmlRpcException.h" + +namespace LiveSupport { +namespace Core { + + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * Exception signaling an XML-RPC communcation problem. + * + * @author $Author: maroy $ + * @version $Revision: 1.1 $ + */ +class XmlRpcCommunicationException : public XmlRpcException +{ + public: + /** + * Constructor based on a string. + * + * @param msg the message of the exception. + */ + XmlRpcCommunicationException(const std::string &msg) throw () + : XmlRpcException(msg) + { + } + + /** + * Constructor based on a parent exception. + * + * @param parent the parent exception to this one. + */ + XmlRpcCommunicationException(const std::exception & parent) + throw () + : XmlRpcException(parent) + { + } + + /** + * Constructor based on a message ant a parent exception. + * + * @param msg the message of the exception. + * @param parent the parent exception. + */ + XmlRpcCommunicationException(const std::string & msg, + const std::exception & parent) + throw () + : XmlRpcException(msg, parent) + { + } + + /** + * Virtual destructor. + */ + ~XmlRpcCommunicationException(void) throw () + { + } + +}; + + +/* ================================================= external data structures */ + + +/* ====================================================== function prototypes */ + + +} // namespace Core +} // namespace LiveSupport + +#endif // LiveSupport_Core_XmlRpcCommunicationException_h + diff --git a/livesupport/modules/core/include/LiveSupport/Core/XmlRpcException.h b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcException.h new file mode 100644 index 000000000..ad9ff399a --- /dev/null +++ b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcException.h @@ -0,0 +1,151 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: maroy $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/XmlRpcException.h,v $ + +------------------------------------------------------------------------------*/ +#ifndef LiveSupport_Core_XmlRpcException_h +#define LiveSupport_Core_XmlRpcException_h + +#ifndef __cplusplus +#error This is a C++ include file +#endif + + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include + +#include "LiveSupport/Core/Ptr.h" + +namespace LiveSupport { +namespace Core { + + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * Common parent of exception classes for XML-RPC related problems. + * + * @author $Author: maroy $ + * @version $Revision: 1.1 $ + */ +class XmlRpcException : public std::exception +{ + private: + /** + * The message of the exception. + */ + Ptr::Ref message; + + /** + * A possible embedded exception. + */ + const std::exception & parent; + + public: + /** + * Constructor based on a string. + * + * @param msg the message of the exception. + */ + XmlRpcException(const std::string &msg) throw () + : parent(*this) + { + message.reset(new std::string(msg)); + } + + /** + * Constructor based on a parent exception. + * + * @param parent the parent exception to this one. + */ + XmlRpcException(const std::exception & parent) throw () + : parent(parent) + { + message.reset(new std::string(parent.what())); + } + + /** + * Constructor based on a message ant a parent exception. + * + * @param msg the message of the exception. + * @param parent the parent exception. + */ + XmlRpcException(const std::string & msg, + const std::exception & parent) throw (); + + /** + * Virtual destructor. + */ + ~XmlRpcException(void) throw () + { + } + + /** + * Get the message of the exception. + * + * @return the message of the exception. + */ + virtual const char * + what(void) const throw () + { + return message->c_str(); + } + + /** + * Get the parent exception. + * + * @return the parent exception, which may be null. + */ + virtual const std::exception * + getParent(void) const throw () + { + return &parent == this ? 0 : &parent; + } +}; + + +/* ================================================= external data structures */ + + +/* ====================================================== function prototypes */ + + +} // namespace Core +} // namespace LiveSupport + +#endif // LiveSupport_Core_XmlRpcException_h + diff --git a/livesupport/modules/core/include/LiveSupport/Core/XmlRpcIOException.h b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcIOException.h new file mode 100644 index 000000000..9258b4ae0 --- /dev/null +++ b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcIOException.h @@ -0,0 +1,120 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: maroy $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/XmlRpcIOException.h,v $ + +------------------------------------------------------------------------------*/ +#ifndef LiveSupport_Core_XmlRpcIOException_h +#define LiveSupport_Core_XmlRpcIOException_h + +#ifndef __cplusplus +#error This is a C++ include file +#endif + + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include "LiveSupport/Core/XmlRpcException.h" + +namespace LiveSupport { +namespace Core { + + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * Exception signaling an XML-RPC I/O problem. + * + * @author $Author: maroy $ + * @version $Revision: 1.1 $ + */ +class XmlRpcIOException : public XmlRpcException +{ + public: + /** + * Constructor based on a string. + * + * @param msg the message of the exception. + */ + XmlRpcIOException(const std::string &msg) throw () + : XmlRpcException(msg) + { + } + + /** + * Constructor based on a parent exception. + * + * @param parent the parent exception to this one. + */ + XmlRpcIOException(const std::exception & parent) + throw () + : XmlRpcException(parent) + { + } + + /** + * Constructor based on a message ant a parent exception. + * + * @param msg the message of the exception. + * @param parent the parent exception. + */ + XmlRpcIOException(const std::string & msg, + const std::exception & parent) + throw () + : XmlRpcException(msg, parent) + { + } + + /** + * Virtual destructor. + */ + ~XmlRpcIOException(void) throw () + { + } + +}; + + +/* ================================================= external data structures */ + + +/* ====================================================== function prototypes */ + + +} // namespace Core +} // namespace LiveSupport + +#endif // LiveSupport_Core_XmlRpcIOException_h + diff --git a/livesupport/modules/core/include/LiveSupport/Core/XmlRpcInvalidArgumentException.h b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcInvalidArgumentException.h new file mode 100644 index 000000000..84b55fe99 --- /dev/null +++ b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcInvalidArgumentException.h @@ -0,0 +1,120 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: maroy $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/XmlRpcInvalidArgumentException.h,v $ + +------------------------------------------------------------------------------*/ +#ifndef LiveSupport_Core_XmlRpcInvalidArgumentException_h +#define LiveSupport_Core_XmlRpcInvalidArgumentException_h + +#ifndef __cplusplus +#error This is a C++ include file +#endif + + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include "LiveSupport/Core/XmlRpcException.h" + +namespace LiveSupport { +namespace Core { + + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * Exception signaling an XML-RPC invalid parameter problem. + * + * @author $Author: maroy $ + * @version $Revision: 1.1 $ + */ +class XmlRpcInvalidArgumentException : public XmlRpcException +{ + public: + /** + * Constructor based on a string. + * + * @param msg the message of the exception. + */ + XmlRpcInvalidArgumentException(const std::string &msg) throw () + : XmlRpcException(msg) + { + } + + /** + * Constructor based on a parent exception. + * + * @param parent the parent exception to this one. + */ + XmlRpcInvalidArgumentException(const std::exception & parent) + throw () + : XmlRpcException(parent) + { + } + + /** + * Constructor based on a message ant a parent exception. + * + * @param msg the message of the exception. + * @param parent the parent exception. + */ + XmlRpcInvalidArgumentException(const std::string & msg, + const std::exception & parent) + throw () + : XmlRpcException(msg, parent) + { + } + + /** + * Virtual destructor. + */ + ~XmlRpcInvalidArgumentException(void) throw () + { + } + +}; + + +/* ================================================= external data structures */ + + +/* ====================================================== function prototypes */ + + +} // namespace Core +} // namespace LiveSupport + +#endif // LiveSupport_Core_XmlRpcInvalidArgumentException_h + diff --git a/livesupport/modules/core/include/LiveSupport/Core/XmlRpcMethodFaultException.h b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcMethodFaultException.h new file mode 100644 index 000000000..3484f15da --- /dev/null +++ b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcMethodFaultException.h @@ -0,0 +1,120 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: maroy $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/XmlRpcMethodFaultException.h,v $ + +------------------------------------------------------------------------------*/ +#ifndef LiveSupport_Core_XmlRpcMethodFaultException_h +#define LiveSupport_Core_XmlRpcMethodFaultException_h + +#ifndef __cplusplus +#error This is a C++ include file +#endif + + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include "LiveSupport/Core/XmlRpcException.h" + +namespace LiveSupport { +namespace Core { + + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * Exception signaling an XML-RPC method call problem. + * + * @author $Author: maroy $ + * @version $Revision: 1.1 $ + */ +class XmlRpcMethodFaultException : public XmlRpcException +{ + public: + /** + * Constructor based on a string. + * + * @param msg the message of the exception. + */ + XmlRpcMethodFaultException(const std::string &msg) throw () + : XmlRpcException(msg) + { + } + + /** + * Constructor based on a parent exception. + * + * @param parent the parent exception to this one. + */ + XmlRpcMethodFaultException(const std::exception & parent) + throw () + : XmlRpcException(parent) + { + } + + /** + * Constructor based on a message ant a parent exception. + * + * @param msg the message of the exception. + * @param parent the parent exception. + */ + XmlRpcMethodFaultException(const std::string & msg, + const std::exception & parent) + throw () + : XmlRpcException(msg, parent) + { + } + + /** + * Virtual destructor. + */ + ~XmlRpcMethodFaultException(void) throw () + { + } + +}; + + +/* ================================================= external data structures */ + + +/* ====================================================== function prototypes */ + + +} // namespace Core +} // namespace LiveSupport + +#endif // LiveSupport_Core_XmlRpcMethodFaultException_h + diff --git a/livesupport/modules/core/include/LiveSupport/Core/XmlRpcMethodResponseException.h b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcMethodResponseException.h new file mode 100644 index 000000000..a41bc26ef --- /dev/null +++ b/livesupport/modules/core/include/LiveSupport/Core/XmlRpcMethodResponseException.h @@ -0,0 +1,120 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: maroy $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/XmlRpcMethodResponseException.h,v $ + +------------------------------------------------------------------------------*/ +#ifndef LiveSupport_Core_XmlRpcMethodResponseException_h +#define LiveSupport_Core_XmlRpcMethodResponseException_h + +#ifndef __cplusplus +#error This is a C++ include file +#endif + + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include "LiveSupport/Core/XmlRpcException.h" + +namespace LiveSupport { +namespace Core { + + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * Exception signaling an XML-RPC method response problem. + * + * @author $Author: maroy $ + * @version $Revision: 1.1 $ + */ +class XmlRpcMethodResponseException : public XmlRpcException +{ + public: + /** + * Constructor based on a string. + * + * @param msg the message of the exception. + */ + XmlRpcMethodResponseException(const std::string &msg) throw () + : XmlRpcException(msg) + { + } + + /** + * Constructor based on a parent exception. + * + * @param parent the parent exception to this one. + */ + XmlRpcMethodResponseException(const std::exception & parent) + throw () + : XmlRpcException(parent) + { + } + + /** + * Constructor based on a message ant a parent exception. + * + * @param msg the message of the exception. + * @param parent the parent exception. + */ + XmlRpcMethodResponseException(const std::string & msg, + const std::exception & parent) + throw () + : XmlRpcException(msg, parent) + { + } + + /** + * Virtual destructor. + */ + ~XmlRpcMethodResponseException(void) throw () + { + } + +}; + + +/* ================================================= external data structures */ + + +/* ====================================================== function prototypes */ + + +} // namespace Core +} // namespace LiveSupport + +#endif // LiveSupport_Core_XmlRpcMethodResponseException_h + diff --git a/livesupport/modules/core/src/XmlRpcException.cxx b/livesupport/modules/core/src/XmlRpcException.cxx new file mode 100644 index 000000000..ee36c9ccf --- /dev/null +++ b/livesupport/modules/core/src/XmlRpcException.cxx @@ -0,0 +1,65 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + LiveSupport is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author: maroy $ + Version : $Revision: 1.1 $ + Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/XmlRpcException.cxx,v $ + +------------------------------------------------------------------------------*/ + +/* ============================================================ include files */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include + +#include "LiveSupport/Core/XmlRpcException.h" + +using namespace LiveSupport::Core; + +/* =================================================== local data structures */ + + +/* ================================================ local constants & macros */ + + +/* =============================================== local function prototypes */ + + +/* ============================================================= module code */ + +/*------------------------------------------------------------------------------ + * Constructor. + *----------------------------------------------------------------------------*/ +XmlRpcException :: XmlRpcException(const std::string & msg, + const std::exception & parent) + throw () + : parent(parent) +{ + message.reset(new std::string(msg)); + message->append("\nparent exception:\n"); + message->append(parent.what()); +} + diff --git a/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h b/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h index 372b62f98..a1cf1c48e 100644 --- a/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h +++ b/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h @@ -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/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h,v $ ------------------------------------------------------------------------------*/ @@ -45,7 +45,7 @@ #include "LiveSupport/Core/UniqueId.h" #include "LiveSupport/Core/Playlist.h" #include "LiveSupport/Core/SessionId.h" -#include "LiveSupport/Storage/StorageException.h" +#include "LiveSupport/Core/XmlRpcException.h" namespace LiveSupport { @@ -64,8 +64,8 @@ using namespace Core; /** * An interface for storage clients. * - * @author $Author: fgerlits $ - * @version $Revision: 1.3 $ + * @author $Author: maroy $ + * @version $Revision: 1.4 $ */ class StorageClientInterface { @@ -77,13 +77,13 @@ class StorageClientInterface * @param id the id of the playlist to check for. * @return true if a playlist with the specified id exists, * false otherwise. - * @exception StorageException if there is a problem with the XML-RPC - * call. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call. */ virtual const bool existsPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -92,14 +92,14 @@ class StorageClientInterface * @param sessionId the session ID from the authentication client * @param id the id of the playlist to return. * @return the requested playlist. - * @exception StorageException if there is a problem with the XML-RPC - * call or no playlist with the specified - * id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no playlist with the specified + * id exists. */ virtual Ptr::Ref getPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -108,14 +108,14 @@ class StorageClientInterface * @param sessionId the session ID from the authentication client * @param id the id of the playlist to return. * @return the requested playlist. - * @exception StorageException if there is a problem with the XML-RPC - * call or no playlist with the specified - * id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no playlist with the specified + * id exists. */ virtual Ptr::Ref editPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -123,14 +123,14 @@ class StorageClientInterface * * @param sessionId the session ID from the authentication client * @param playlist the playlist to save. - * @exception StorageException if there is a problem with the XML-RPC - * call or the playlist has not been - * previously opened by getPlaylist() + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or the playlist has not been + * previously opened by getPlaylist() */ virtual void savePlaylist(Ptr::Ref sessionId, Ptr::Ref playlist) const - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -141,14 +141,14 @@ class StorageClientInterface * @return a new Playlist instance containing a uri field which * points to an executable (playable) SMIL representation of * the playlist (in the local storage). - * @exception StorageException if there is a problem with the XML-RPC - * call or no playlist with the specified - * specified id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no playlist with the specified + * specified id exists. */ virtual Ptr::Ref acquirePlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -157,28 +157,28 @@ class StorageClientInterface * * @param sessionId the session ID from the authentication client * @param playlist the playlist to release. - * @exception StorageException if there is a problem with the XML-RPC - * call or the playlist has no uri field, - * or the file does not exist, etc. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or the playlist has no uri field, + * or the file does not exist, etc. */ virtual void releasePlaylist(Ptr::Ref sessionId, Ptr::Ref playlist) const - throw (StorageException) + throw (XmlRpcException) = 0; /** * Delete a playlist with the specified id. * * @param sessionId the session ID from the authentication client * @param id the id of the playlist to be deleted. - * @exception StorageException if there is a problem with the XML-RPC - * call or no playlist with the specified - * id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no playlist with the specified + * id exists. */ virtual void deletePlaylist(Ptr::Ref sessionId, Ptr::Ref id) - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -186,12 +186,12 @@ class StorageClientInterface * * @param sessionId the session ID from the authentication client * @return a vector containing the playlists. - * @exception StorageException if there is a problem with the XML-RPC - * call. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call. */ virtual Ptr::Ref> >::Ref getAllPlaylists(Ptr::Ref sessionId) const - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -199,12 +199,12 @@ class StorageClientInterface * * @param sessionId the session ID from the authentication client * @return the newly created playlist. - * @exception StorageException if there is a problem with the XML-RPC - * call. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call. */ virtual Ptr::Ref createPlaylist(Ptr::Ref sessionId) - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -214,13 +214,13 @@ class StorageClientInterface * @param id the id of the audio clip to check for. * @return true if an audio clip with the specified id exists, * false otherwise. - * @exception StorageException if there is a problem with the XML-RPC - * call. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call. */ virtual const bool existsAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -229,14 +229,14 @@ class StorageClientInterface * @param sessionId the session ID from the authentication client * @param id the id of the audio clip to return. * @return the requested audio clip. - * @exception StorageException if there is a problem with the XML-RPC - * call or no audio clip with the - * specified id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no audio clip with the + * specified id exists. */ virtual Ptr::Ref getAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -245,13 +245,13 @@ class StorageClientInterface * @param sessionId the session ID from the authentication client * @param audioClip the audio clip to store. * - * @exception StorageException if there is a problem with the XML-RPC - * call or we have not logged in yet. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or we have not logged in yet. */ virtual void storeAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -261,14 +261,14 @@ class StorageClientInterface * @param id the id of the audio clip to acquire. * @return a new AudioClip instance, containing a uri field which * points to (a way of getting) the sound file. - * @exception StorageException if there is a problem with the XML-RPC - * call or if no audio clip with the - * specified id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or if no audio clip with the + * specified id exists. */ virtual Ptr::Ref acquireAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -276,14 +276,14 @@ class StorageClientInterface * * @param sessionId the session ID from the authentication client * @param audioClip the id of the audio clip to release. - * @exception StorageException if there is a problem with the XML-RPC - * call or the audio clip has no uri field, - * or the file does not exist, etc. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or the audio clip has no uri field, + * or the file does not exist, etc. */ virtual void releaseAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) const - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -291,14 +291,14 @@ class StorageClientInterface * * @param sessionId the session ID from the authentication client * @param id the id of the audio clip to be deleted. - * @exception StorageException if there is a problem with the XML-RPC - * call or no audio clip with the - * specified id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no audio clip with the + * specified id exists. */ virtual void deleteAudioClip(Ptr::Ref sessionId, Ptr::Ref id) - throw (StorageException) + throw (XmlRpcException) = 0; /** @@ -306,12 +306,12 @@ class StorageClientInterface * * @param sessionId the session ID from the authentication client * @return a vector containing the playlists. - * @exception StorageException if there is a problem with the XML-RPC - * call. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call. */ virtual Ptr::Ref> >::Ref getAllAudioClips(Ptr::Ref sessionId) const - throw (StorageException) + throw (XmlRpcException) = 0; }; diff --git a/livesupport/modules/storage/include/LiveSupport/Storage/StorageException.h b/livesupport/modules/storage/include/LiveSupport/Storage/StorageException.h deleted file mode 100644 index e7d321059..000000000 --- a/livesupport/modules/storage/include/LiveSupport/Storage/StorageException.h +++ /dev/null @@ -1,137 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the LiveSupport project. - http://livesupport.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - LiveSupport is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - LiveSupport is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with LiveSupport; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author: fgerlits $ - Version : $Revision: 1.2 $ - Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/include/LiveSupport/Storage/Attic/StorageException.h,v $ - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Storage_StorageException_h -#define LiveSupport_Storage_StorageException_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -namespace LiveSupport { -namespace Storage { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Common parent of exception classes for this module. - * - * @author $Author: fgerlits $ - * @version $Revision: 1.2 $ - */ -class StorageException : public std::runtime_error -{ - public: - StorageException(const std::string &msg) - : std::runtime_error(msg) { - } -}; - -/** - * XML-RPC communication problem. - */ -class XmlRpcCommunicationException : public StorageException -{ - public: - XmlRpcCommunicationException(const std::string &msg) - : StorageException(msg) { - } -}; - -/** - * XML-RPC fault thrown by the method called. - */ -class XmlRpcMethodFaultException : public StorageException -{ - public: - XmlRpcMethodFaultException(const std::string &msg) - : StorageException(msg) { - } -}; - -/** - * Unexpected response from the XML-RPC method. - */ -class XmlRpcMethodResponseException : public StorageException -{ - public: - XmlRpcMethodResponseException(const std::string &msg) - : StorageException(msg) { - } -}; - -/** - * Bad parameter passed to storage client. - */ -class InvalidArgumentException : public StorageException -{ - public: - InvalidArgumentException(const std::string &msg) - : StorageException(msg) { - } -}; - -/** - * Problem with reading or writing local files. - */ -class IOException : public StorageException -{ - public: - IOException(const std::string &msg) - : StorageException(msg) { - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Storage -} // namespace LiveSupport - -#endif // LiveSupport_Storage_StorageException_h - diff --git a/livesupport/modules/storage/src/StorageClientFactoryTest.cxx b/livesupport/modules/storage/src/StorageClientFactoryTest.cxx index a6eca0b1c..8972ba072 100644 --- a/livesupport/modules/storage/src/StorageClientFactoryTest.cxx +++ b/livesupport/modules/storage/src/StorageClientFactoryTest.cxx @@ -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/modules/storage/src/StorageClientFactoryTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -152,7 +152,7 @@ StorageClientFactoryTest :: firstTest(void) try { CPPUNIT_ASSERT( storage->existsPlaylist(sessionId, id01)); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "existsPlaylist returned error:\n"; eMsg += e.what(); CPPUNIT_FAIL(eMsg); @@ -161,7 +161,7 @@ StorageClientFactoryTest :: firstTest(void) try { CPPUNIT_ASSERT(!storage->existsPlaylist(sessionId, id77)); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "existsPlaylist returned error:\n"; eMsg += e.what(); CPPUNIT_FAIL(eMsg); @@ -171,7 +171,7 @@ StorageClientFactoryTest :: firstTest(void) Ptr::Ref playlist = storage->getPlaylist(sessionId, id01); CPPUNIT_ASSERT(playlist->getId()->getId() == id01->getId()); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "getPlaylist returned error:\n"; eMsg += e.what(); CPPUNIT_FAIL(eMsg); diff --git a/livesupport/modules/storage/src/TestStorageClient.cxx b/livesupport/modules/storage/src/TestStorageClient.cxx index dee263eb2..f2e0ae828 100644 --- a/livesupport/modules/storage/src/TestStorageClient.cxx +++ b/livesupport/modules/storage/src/TestStorageClient.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.25 $ + Author : $Author: maroy $ + Version : $Revision: 1.26 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.cxx,v $ ------------------------------------------------------------------------------*/ @@ -42,6 +42,8 @@ #include #include +#include "LiveSupport/Core/XmlRpcInvalidArgumentException.h" +#include "LiveSupport/Core/XmlRpcIOException.h" #include "TestStorageClient.h" using namespace boost::posix_time; @@ -205,12 +207,12 @@ TestStorageClient :: existsPlaylist(Ptr::Ref sessionId, Ptr::Ref TestStorageClient :: getPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { PlaylistMap::const_iterator it = playlistMap.find(id->getId()); if (it == playlistMap.end()) { - throw StorageException("no such playlist"); + throw XmlRpcException("no such playlist"); } return it->second; @@ -223,12 +225,12 @@ TestStorageClient :: getPlaylist(Ptr::Ref sessionId, Ptr::Ref TestStorageClient :: editPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { PlaylistMap::const_iterator it = playlistMap.find(id->getId()); if (it == playlistMap.end()) { - throw StorageException("no such playlist"); + throw XmlRpcException("no such playlist"); } return it->second; @@ -252,12 +254,12 @@ TestStorageClient :: savePlaylist(Ptr::Ref sessionId, Ptr::Ref TestStorageClient :: acquirePlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { PlaylistMap::const_iterator playlistMapIt = playlistMap.find(id->getId()); if (playlistMapIt == playlistMap.end()) { - throw Storage::InvalidArgumentException("no such playlist"); + throw XmlRpcInvalidArgumentException("no such playlist"); } Ptr::Ref oldPlaylist = playlistMapIt->second; @@ -317,7 +319,7 @@ TestStorageClient :: acquirePlaylist(Ptr::Ref sessionId, ++it; } else { // this should never happen - throw Storage::InvalidArgumentException( + throw XmlRpcInvalidArgumentException( "unexpected playlist element type " "(neither audio clip nor playlist)"); } @@ -342,16 +344,16 @@ TestStorageClient :: acquirePlaylist(Ptr::Ref sessionId, void TestStorageClient :: releasePlaylist(Ptr::Ref sessionId, Ptr::Ref playlist) const - throw (StorageException) + throw (XmlRpcException) { if (! playlist->getUri()) { - throw Storage::InvalidArgumentException("playlist URI not found"); + throw XmlRpcInvalidArgumentException("playlist URI not found"); } std::ifstream ifs(playlist->getUri()->substr(7).c_str()); if (!ifs) { // cut of "file://" ifs.close(); - throw Storage::IOException("playlist temp file not found"); + throw XmlRpcIOException("playlist temp file not found"); } ifs.close(); @@ -365,7 +367,7 @@ TestStorageClient :: releasePlaylist(Ptr::Ref sessionId, try { releaseAudioClip(sessionId, it->second->getAudioClip()); } - catch (StorageException &e) { + catch (XmlRpcException &e) { eMsg += e.what(); eMsg += "\n"; } @@ -375,7 +377,7 @@ TestStorageClient :: releasePlaylist(Ptr::Ref sessionId, try { releasePlaylist(sessionId, it->second->getPlaylist()); } - catch (StorageException &e) { + catch (XmlRpcException &e) { eMsg += e.what(); eMsg += "\n"; } @@ -391,7 +393,7 @@ TestStorageClient :: releasePlaylist(Ptr::Ref sessionId, if (eMsg != "") { eMsg.insert(0, "some playlist elements could not be released:\n"); - throw Storage::InvalidArgumentException(eMsg); + throw XmlRpcInvalidArgumentException(eMsg); } } @@ -402,11 +404,11 @@ TestStorageClient :: releasePlaylist(Ptr::Ref sessionId, void TestStorageClient :: deletePlaylist(Ptr::Ref sessionId, Ptr::Ref id) - throw (StorageException) + throw (XmlRpcException) { // erase() returns the number of entries found & erased if (!playlistMap.erase(id->getId())) { - throw StorageException("no such playlist"); + throw XmlRpcException("no such playlist"); } } @@ -474,12 +476,12 @@ TestStorageClient :: existsAudioClip(Ptr::Ref sessionId, Ptr::Ref TestStorageClient :: getAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { AudioClipMap::const_iterator it = audioClipMap.find(id->getId()); if (it == audioClipMap.end()) { - throw StorageException("no such audio clip"); + throw XmlRpcException("no such audio clip"); } return it->second; @@ -492,7 +494,7 @@ TestStorageClient :: getAudioClip(Ptr::Ref sessionId, void TestStorageClient :: storeAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) - throw (StorageException) + throw (XmlRpcException) { if (!audioClip->getId()) { audioClip->setId(UniqueId::generateId()); @@ -508,18 +510,18 @@ TestStorageClient :: storeAudioClip(Ptr::Ref sessionId, Ptr::Ref TestStorageClient :: acquireAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { AudioClipMap::const_iterator it = audioClipMap.find(id->getId()); if (it == audioClipMap.end()) { - throw StorageException("no such audio clip"); + throw XmlRpcException("no such audio clip"); } Ptr::Ref storedAudioClip = it->second; if (! storedAudioClip->getUri()) { - throw StorageException("audio clip URI not found"); + throw XmlRpcException("audio clip URI not found"); } // cut the "file:" off std::string audioClipFileName = storedAudioClip->getUri()->substr(5); @@ -527,7 +529,7 @@ TestStorageClient :: acquireAudioClip(Ptr::Ref sessionId, std::ifstream ifs(audioClipFileName.c_str()); if (!ifs) { ifs.close(); - throw StorageException("could not read audio clip"); + throw XmlRpcException("could not read audio clip"); } ifs.close(); @@ -549,10 +551,10 @@ TestStorageClient :: acquireAudioClip(Ptr::Ref sessionId, void TestStorageClient :: releaseAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) const - throw (StorageException) + throw (XmlRpcException) { if (*(audioClip->getUri()) == "") { - throw StorageException("audio clip URI not found"); + throw XmlRpcException("audio clip URI not found"); } Ptr::Ref nullPointer; @@ -566,11 +568,11 @@ TestStorageClient :: releaseAudioClip(Ptr::Ref sessionId, void TestStorageClient :: deleteAudioClip(Ptr::Ref sessionId, Ptr::Ref id) - throw (StorageException) + throw (XmlRpcException) { // erase() returns the number of entries found & erased if (!audioClipMap.erase(id->getId())) { - throw StorageException("no such audio clip"); + throw XmlRpcException("no such audio clip"); } } diff --git a/livesupport/modules/storage/src/TestStorageClient.h b/livesupport/modules/storage/src/TestStorageClient.h index d6faf1662..c89e34d80 100644 --- a/livesupport/modules/storage/src/TestStorageClient.h +++ b/livesupport/modules/storage/src/TestStorageClient.h @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.21 $ + Author : $Author: maroy $ + Version : $Revision: 1.22 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $ ------------------------------------------------------------------------------*/ @@ -89,8 +89,8 @@ using namespace LiveSupport::Core; * <!ATTLIST testStorage tempFiles CDATA #REQUIRED > * * - * @author $Author: fgerlits $ - * @version $Revision: 1.21 $ + * @author $Author: maroy $ + * @version $Revision: 1.22 $ */ class TestStorageClient : virtual public Configurable, @@ -183,13 +183,13 @@ class TestStorageClient : * @param sessionId the session ID from the authentication client * @param id the id of the playlist to return. * @return the requested playlist. - * @exception StorageException if no playlist with the specified - * id exists. + * @exception XmlRpcException if no playlist with the specified + * id exists. */ virtual Ptr::Ref getPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** @@ -198,13 +198,13 @@ class TestStorageClient : * @param sessionId the session ID from the authentication client * @param id the id of the playlist to return. * @return the requested playlist. - * @exception StorageException if no playlist with the specified - * id exists. + * @exception XmlRpcException if no playlist with the specified + * id exists. */ virtual Ptr::Ref editPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** @@ -232,13 +232,13 @@ class TestStorageClient : * @return a new Playlist instance containing a uri field which * points to an executable (playable) SMIL representation of * the playlist (in the local storage). - * @exception StorageException if no playlist with the specified - * specified id exists. + * @exception XmlRpcException if no playlist with the specified + * specified id exists. */ virtual Ptr::Ref acquirePlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** @@ -247,26 +247,26 @@ class TestStorageClient : * * @param sessionId the session ID from the authentication client * @param playlist the playlist to release. - * @exception StorageException if the playlist has no uri field, - * or the file does not exist, etc. + * @exception XmlRpcException if the playlist has no uri field, + * or the file does not exist, etc. */ virtual void releasePlaylist(Ptr::Ref sessionId, Ptr::Ref playlist) const - throw (StorageException); + throw (XmlRpcException); /** * Delete a playlist with the specified id. * * @param sessionId the session ID from the authentication client * @param id the id of the playlist to be deleted. - * @exception StorageException if no playlist with the specified - * id exists. + * @exception XmlRpcException if no playlist with the specified + * id exists. */ virtual void deletePlaylist(Ptr::Ref sessionId, Ptr::Ref id) - throw (StorageException); + throw (XmlRpcException); /** @@ -310,13 +310,13 @@ class TestStorageClient : * @param sessionId the session ID from the authentication client * @param id the id of the audio clip to return. * @return the requested audio clip. - * @exception StorageException if no audio clip with the - * specified id exists. + * @exception XmlRpcException if no audio clip with the + * specified id exists. */ virtual Ptr::Ref getAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** * Store an audio clip. @@ -324,12 +324,12 @@ class TestStorageClient : * @param sessionId the session ID from the authentication client * @param audioClip the audio clip to store. * - * @exception StorageException if we have not logged in yet. + * @exception XmlRpcException if we have not logged in yet. */ virtual void storeAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) - throw (StorageException); + throw (XmlRpcException); /** * Acquire the resources for the audio clip with the specified id. @@ -343,13 +343,13 @@ class TestStorageClient : * @param id the id of the audio clip to acquire. * @return a new AudioClip instance, containing a uri field which * points to (a way of getting) the sound file. - * @exception StorageException if no audio clip with the - * specified id exists. + * @exception XmlRpcException if no audio clip with the + * specified id exists. */ virtual Ptr::Ref acquireAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** @@ -357,13 +357,13 @@ class TestStorageClient : * * @param sessionId the session ID from the authentication client * @param audioClip the id of the audio clip to release. - * @exception StorageException if the audio clip has no uri field, + * @exception XmlRpcException if the audio clip has no uri field, * or the file does not exist, etc. */ virtual void releaseAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) const - throw (StorageException); + throw (XmlRpcException); /** @@ -371,13 +371,13 @@ class TestStorageClient : * * @param sessionId the session ID from the authentication client * @param id the id of the audio clip to be deleted. - * @exception StorageException if no audio clip with the - * specified id exists. + * @exception XmlRpcException if no audio clip with the + * specified id exists. */ virtual void deleteAudioClip(Ptr::Ref sessionId, Ptr::Ref id) - throw (StorageException); + throw (XmlRpcException); /** diff --git a/livesupport/modules/storage/src/TestStorageClientTest.cxx b/livesupport/modules/storage/src/TestStorageClientTest.cxx index eb1ff9065..6ff79b79a 100644 --- a/livesupport/modules/storage/src/TestStorageClientTest.cxx +++ b/livesupport/modules/storage/src/TestStorageClientTest.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.19 $ + Author : $Author: maroy $ + Version : $Revision: 1.20 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClientTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -135,17 +135,17 @@ TestStorageClientTest :: deletePlaylistTest(void) try { tsc->deletePlaylist(dummySessionId, id2); CPPUNIT_FAIL("allowed to delete non-existent playlist"); - } catch (StorageException &e) { + } catch (XmlRpcException &e) { } try { tsc->deletePlaylist(dummySessionId, id1); - } catch (StorageException &e) { + } catch (XmlRpcException &e) { CPPUNIT_FAIL("cannot delete existing playlist"); } try { tsc->deletePlaylist(dummySessionId, id1); CPPUNIT_FAIL("allowed to delete non-existent playlist"); - } catch (StorageException &e) { + } catch (XmlRpcException &e) { } } @@ -235,7 +235,7 @@ TestStorageClientTest :: acquireAudioClipTest(void) try { audioClip = tsc->acquireAudioClip(dummySessionId, id2); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "could not acquire audio clip:\n"; eMsg += e.what(); CPPUNIT_FAIL(eMsg); @@ -248,7 +248,7 @@ TestStorageClientTest :: acquireAudioClipTest(void) try { tsc->releaseAudioClip(dummySessionId, audioClip); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "could not release audio clip:\n"; eMsg += e.what(); CPPUNIT_FAIL(eMsg); @@ -258,7 +258,7 @@ TestStorageClientTest :: acquireAudioClipTest(void) audioClip = tsc->acquireAudioClip(dummySessionId, id77); CPPUNIT_FAIL("allowed to acquire non-existent audio clip"); } - catch (StorageException &e) { + catch (XmlRpcException &e) { } } @@ -277,7 +277,7 @@ TestStorageClientTest :: acquirePlaylistTest(void) try { playlist = tsc->acquirePlaylist(dummySessionId, id1); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "could not acquire playlist:\n"; eMsg += e.what(); CPPUNIT_FAIL(eMsg); @@ -296,7 +296,7 @@ TestStorageClientTest :: acquirePlaylistTest(void) try { tsc->releasePlaylist(dummySessionId, playlist); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "could not release playlist:\n"; eMsg += e.what(); CPPUNIT_FAIL(eMsg); @@ -313,6 +313,6 @@ TestStorageClientTest :: acquirePlaylistTest(void) playlist = tsc->acquirePlaylist(dummySessionId, id77); CPPUNIT_FAIL("allowed to acquire non-existent playlist"); } - catch (StorageException &e) { + catch (XmlRpcException &e) { } } diff --git a/livesupport/modules/storage/src/WebStorageClient.cxx b/livesupport/modules/storage/src/WebStorageClient.cxx index eab96d677..17c8dfe97 100644 --- a/livesupport/modules/storage/src/WebStorageClient.cxx +++ b/livesupport/modules/storage/src/WebStorageClient.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.20 $ + Author : $Author: maroy $ + Version : $Revision: 1.21 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.cxx,v $ ------------------------------------------------------------------------------*/ @@ -49,6 +49,11 @@ #include #include "LiveSupport/Core/Md5.h" +#include "LiveSupport/Core/XmlRpcCommunicationException.h" +#include "LiveSupport/Core/XmlRpcMethodFaultException.h" +#include "LiveSupport/Core/XmlRpcMethodResponseException.h" +#include "LiveSupport/Core/XmlRpcInvalidArgumentException.h" +#include "LiveSupport/Core/XmlRpcIOException.h" #include "WebStorageClient.h" using namespace boost::posix_time; @@ -645,7 +650,7 @@ WebStorageClient :: configure(const xmlpp::Element & element) const bool WebStorageClient :: existsPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { XmlRpcValue parameters; XmlRpcValue result; @@ -698,7 +703,7 @@ WebStorageClient :: existsPlaylist(Ptr::Ref sessionId, Ptr::Ref WebStorageClient :: getPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { XmlRpcValue parameters; XmlRpcValue result; @@ -810,7 +815,7 @@ WebStorageClient :: getPlaylist(Ptr::Ref sessionId, Ptr::Ref WebStorageClient :: editPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { Ptr::Ref playlist(new Playlist(id)); Ptr::Ref url, token; @@ -844,7 +849,7 @@ WebStorageClient :: editPlaylistGetUrl(Ptr::Ref sessionId, Ptr::Ref id, Ptr::Ref& url, Ptr::Ref& token) const - throw (StorageException) + throw (XmlRpcException) { XmlRpcValue parameters; XmlRpcValue result; @@ -901,10 +906,10 @@ WebStorageClient :: editPlaylistGetUrl(Ptr::Ref sessionId, void WebStorageClient :: savePlaylist(Ptr::Ref sessionId, Ptr::Ref playlist) const - throw (StorageException) + throw (XmlRpcException) { if (!playlist || !playlist->getToken()) { - throw InvalidArgumentException("playlist has no token field"); + throw XmlRpcInvalidArgumentException("playlist has no token field"); } XmlRpcValue parameters; @@ -969,7 +974,7 @@ WebStorageClient :: savePlaylist(Ptr::Ref sessionId, Ptr::Ref WebStorageClient :: acquirePlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { Ptr::Ref oldPlaylist = getPlaylist(sessionId, id); @@ -1029,7 +1034,7 @@ WebStorageClient :: acquirePlaylist(Ptr::Ref sessionId, ++it; } else { // this should never happen - throw Storage::InvalidArgumentException( + throw XmlRpcInvalidArgumentException( "unexpected playlist element type " "(neither audio clip nor playlist)"); } @@ -1053,16 +1058,16 @@ WebStorageClient :: acquirePlaylist(Ptr::Ref sessionId, void WebStorageClient :: releasePlaylist(Ptr::Ref sessionId, Ptr::Ref playlist) const - throw (StorageException) + throw (XmlRpcException) { if (! playlist->getUri()) { - throw Storage::InvalidArgumentException("playlist URI not found"); + throw XmlRpcInvalidArgumentException("playlist URI not found"); } std::ifstream ifs(playlist->getUri()->substr(7).c_str()); if (!ifs) { // cut of "file://" ifs.close(); - throw Storage::IOException("playlist temp file not found"); + throw XmlRpcIOException("playlist temp file not found"); } ifs.close(); @@ -1076,7 +1081,7 @@ WebStorageClient :: releasePlaylist(Ptr::Ref sessionId, try { releaseAudioClip(sessionId, it->second->getAudioClip()); } - catch (StorageException &e) { + catch (XmlRpcException &e) { eMsg += e.what(); eMsg += "\n"; } @@ -1086,7 +1091,7 @@ WebStorageClient :: releasePlaylist(Ptr::Ref sessionId, try { releasePlaylist(sessionId, it->second->getPlaylist()); } - catch (StorageException &e) { + catch (XmlRpcException &e) { eMsg += e.what(); eMsg += "\n"; } @@ -1102,7 +1107,7 @@ WebStorageClient :: releasePlaylist(Ptr::Ref sessionId, if (eMsg != "") { eMsg.insert(0, "some playlist elements could not be released:\n"); - throw Storage::InvalidArgumentException(eMsg); + throw XmlRpcInvalidArgumentException(eMsg); } } @@ -1113,7 +1118,7 @@ WebStorageClient :: releasePlaylist(Ptr::Ref sessionId, void WebStorageClient :: deletePlaylist(Ptr::Ref sessionId, Ptr::Ref id) - throw (StorageException) + throw (XmlRpcException) { XmlRpcValue parameters; XmlRpcValue result; @@ -1171,7 +1176,7 @@ WebStorageClient :: deletePlaylist(Ptr::Ref sessionId, *----------------------------------------------------------------------------*/ Ptr::Ref> >::Ref WebStorageClient :: getAllPlaylists(Ptr::Ref sessionId) const - throw (StorageException) + throw (XmlRpcException) { Ptr::Ref> >::Ref playlistVector( new std::vector::Ref>); @@ -1184,7 +1189,7 @@ WebStorageClient :: getAllPlaylists(Ptr::Ref sessionId) const *----------------------------------------------------------------------------*/ Ptr::Ref WebStorageClient :: createPlaylist(Ptr::Ref sessionId) - throw (StorageException) + throw (XmlRpcException) { XmlRpcValue parameters; XmlRpcValue result; @@ -1253,7 +1258,7 @@ WebStorageClient :: createPlaylist(Ptr::Ref sessionId) const bool WebStorageClient :: existsAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { XmlRpcValue parameters; XmlRpcValue result; @@ -1306,7 +1311,7 @@ WebStorageClient :: existsAudioClip(Ptr::Ref sessionId, Ptr::Ref WebStorageClient :: getAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { XmlRpcValue parameters; XmlRpcValue result; @@ -1420,10 +1425,11 @@ WebStorageClient :: getAudioClip(Ptr::Ref sessionId, void WebStorageClient :: storeAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) - throw (StorageException) + throw (XmlRpcException) { if (!audioClip || !audioClip->getUri()) { - throw InvalidArgumentException("binary audio clip file not found"); + throw XmlRpcInvalidArgumentException( + "binary audio clip file not found"); } // temporary hack; we will expect an absolute file name from getUri() @@ -1432,7 +1438,7 @@ WebStorageClient :: storeAudioClip(Ptr::Ref sessionId, std::ifstream ifs(binaryFileName.c_str()); if (!ifs) { ifs.close(); - throw IOException("could not read audio clip"); + throw XmlRpcIOException("could not read audio clip"); } std::string md5string = Md5(ifs); ifs.close(); @@ -1495,7 +1501,7 @@ WebStorageClient :: storeAudioClip(Ptr::Ref sessionId, FILE* binaryFile = fopen(binaryFileName.c_str(), "rb"); if (!binaryFile) { - throw IOException("Binary audio clip file not found."); + throw XmlRpcIOException("Binary audio clip file not found."); } fseek(binaryFile, 0, SEEK_END); long binaryFileSize = ftell(binaryFile); @@ -1580,7 +1586,7 @@ WebStorageClient :: storeAudioClip(Ptr::Ref sessionId, Ptr::Ref WebStorageClient :: acquireAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException) + throw (XmlRpcException) { Ptr::Ref audioClip = getAudioClip(sessionId, id); @@ -1646,7 +1652,7 @@ WebStorageClient :: acquireAudioClip(Ptr::Ref sessionId, void WebStorageClient :: releaseAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) const - throw (StorageException) + throw (XmlRpcException) { XmlRpcValue parameters; XmlRpcValue result; @@ -1709,7 +1715,7 @@ WebStorageClient :: releaseAudioClip(Ptr::Ref sessionId, void WebStorageClient :: deleteAudioClip(Ptr::Ref sessionId, Ptr::Ref id) - throw (StorageException) + throw (XmlRpcException) { XmlRpcValue parameters; XmlRpcValue result; @@ -1768,7 +1774,7 @@ WebStorageClient :: deleteAudioClip(Ptr::Ref sessionId, Ptr::Ref> >::Ref WebStorageClient :: getAllAudioClips(Ptr::Ref sessionId) const - throw (StorageException) + throw (XmlRpcException) { Ptr::Ref> >::Ref audioClipVector( new std::vector::Ref>); @@ -1781,7 +1787,7 @@ WebStorageClient :: getAllAudioClips(Ptr::Ref sessionId) *----------------------------------------------------------------------------*/ Ptr::Ref> >::Ref WebStorageClient :: reset(void) - throw (StorageException) + throw (XmlRpcException) { XmlRpcValue parameters; XmlRpcValue result; diff --git a/livesupport/modules/storage/src/WebStorageClient.h b/livesupport/modules/storage/src/WebStorageClient.h index 211dc2ce8..7a15602a3 100644 --- a/livesupport/modules/storage/src/WebStorageClient.h +++ b/livesupport/modules/storage/src/WebStorageClient.h @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.15 $ + Author : $Author: maroy $ + Version : $Revision: 1.16 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.h,v $ ------------------------------------------------------------------------------*/ @@ -98,8 +98,8 @@ using namespace LiveSupport::Core; * <!ATTLIST location path CDATA #REQUIRED > * * - * @author $Author: fgerlits $ - * @version $Revision: 1.15 $ + * @author $Author: maroy $ + * @version $Revision: 1.16 $ */ class WebStorageClient : virtual public Configurable, @@ -139,16 +139,16 @@ class WebStorageClient : * @param id the id of the playlist to return. * @param url pointer in which the URL of the playlist is returned. * @param token pointer in which the token of the playlist is returned. - * @exception StorageException if there is a problem with the XML-RPC - * call or no playlist with the specified - * id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no playlist with the specified + * id exists. */ void editPlaylistGetUrl(Ptr::Ref sessionId, Ptr::Ref id, Ptr::Ref& url, Ptr::Ref& token) const - throw (StorageException); + throw (XmlRpcException); public: /** @@ -191,13 +191,13 @@ class WebStorageClient : * @param id the id of the playlist to check for. * @return true if a playlist with the specified id exists, * false otherwise. - * @exception StorageException if there is a problem with the XML-RPC - * call. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call. */ virtual const bool existsPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** * Return a playlist with the specified id, to be displayed. @@ -205,14 +205,14 @@ class WebStorageClient : * @param sessionId the session ID from the authentication client * @param id the id of the playlist to return. * @return the requested playlist. - * @exception StorageException if there is a problem with the XML-RPC - * call or no playlist with the specified - * id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no playlist with the specified + * id exists. */ virtual Ptr::Ref getPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** @@ -221,28 +221,28 @@ class WebStorageClient : * @param sessionId the session ID from the authentication client * @param id the id of the playlist to return. * @return the requested playlist. - * @exception StorageException if there is a problem with the XML-RPC - * call or no playlist with the specified - * id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no playlist with the specified + * id exists. */ virtual Ptr::Ref editPlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** * Save the playlist after editing. * * @param sessionId the session ID from the authentication client * @param playlist the playlist to save. - * @exception StorageException if there is a problem with the XML-RPC - * call or the playlist has not been - * previously opened by getPlaylist() + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or the playlist has not been + * previously opened by getPlaylist() */ virtual void savePlaylist(Ptr::Ref sessionId, Ptr::Ref playlist) const - throw (StorageException); + throw (XmlRpcException); /** @@ -258,14 +258,14 @@ class WebStorageClient : * @return a new Playlist instance containing a uri field which * points to an executable (playable) SMIL representation of * the playlist (in the local storage). - * @exception StorageException if there is a problem with the XML-RPC - * call or no playlist with the specified - * specified id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no playlist with the specified + * specified id exists. */ virtual Ptr::Ref acquirePlaylist(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** * Release the resources (audio clips, other playlists) used @@ -274,28 +274,28 @@ class WebStorageClient : * * @param sessionId the session ID from the authentication client * @param playlist the playlist to release. - * @exception StorageException if there is a problem with the XML-RPC - * call or the playlist has no uri field, - * or the file does not exist, etc. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or the playlist has no uri field, + * or the file does not exist, etc. */ virtual void releasePlaylist(Ptr::Ref sessionId, Ptr::Ref playlist) const - throw (StorageException); + throw (XmlRpcException); /** * Delete a playlist with the specified id. * * @param sessionId the session ID from the authentication client * @param id the id of the playlist to be deleted. - * @exception StorageException if there is a problem with the XML-RPC - * call or no playlist with the specified - * id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no playlist with the specified + * id exists. */ virtual void deletePlaylist(Ptr::Ref sessionId, Ptr::Ref id) - throw (StorageException); + throw (XmlRpcException); /** * Return a list of all playlists in the playlist store. @@ -306,24 +306,24 @@ class WebStorageClient : * * @param sessionId the session ID from the authentication client * @return a vector containing the playlists. - * @exception StorageException if there is a problem with the XML-RPC - * call. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call. */ virtual Ptr::Ref> >::Ref getAllPlaylists(Ptr::Ref sessionId) const - throw (StorageException); + throw (XmlRpcException); /** * Create a new playlist. * * @param sessionId the session ID from the authentication client * @return the newly created playlist. - * @exception StorageException if there is a problem with the XML-RPC - * call. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call. */ virtual Ptr::Ref createPlaylist(Ptr::Ref sessionId) - throw (StorageException); + throw (XmlRpcException); /** * Tell if an audio clip with a given id exists. @@ -332,13 +332,13 @@ class WebStorageClient : * @param id the id of the audio clip to check for. * @return true if an audio clip with the specified id exists, * false otherwise. - * @exception StorageException if there is a problem with the XML-RPC - * call. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call. */ virtual const bool existsAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** * Return an audio clip with the specified id. @@ -346,14 +346,14 @@ class WebStorageClient : * @param sessionId the session ID from the authentication client * @param id the id of the audio clip to return. * @return the requested audio clip. - * @exception StorageException if there is a problem with the XML-RPC - * call or no audio clip with the - * specified id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no audio clip with the + * specified id exists. */ virtual Ptr::Ref getAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** * Store an audio clip. The uri field of the audio clip @@ -372,13 +372,13 @@ class WebStorageClient : * @param sessionId the session ID from the authentication client * @param audioClip the audio clip to store. * - * @exception StorageException if there is a problem with the XML-RPC - * call or we have not logged in yet. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or we have not logged in yet. */ virtual void storeAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) - throw (StorageException); + throw (XmlRpcException); /** * Acquire the resources for the audio clip with the specified id. @@ -390,14 +390,14 @@ class WebStorageClient : * @param id the id of the audio clip to acquire. * @return a new AudioClip instance, containing a uri field which * points to (a way of getting) the sound file. - * @exception StorageException if there is a problem with the XML-RPC - * call or if no audio clip with the - * specified id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or if no audio clip with the + * specified id exists. */ virtual Ptr::Ref acquireAudioClip(Ptr::Ref sessionId, Ptr::Ref id) const - throw (StorageException); + throw (XmlRpcException); /** * Release the resource (sound file) used by an audio clip. The @@ -406,28 +406,28 @@ class WebStorageClient : * * @param sessionId the session ID from the authentication client * @param audioClip the id of the audio clip to release. - * @exception StorageException if there is a problem with the XML-RPC + * @exception XmlRpcException if there is a problem with the XML-RPC * call or the audio clip has no uri field, * or the file does not exist, etc. */ virtual void releaseAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) const - throw (StorageException); + throw (XmlRpcException); /** * Delete an audio clip with the specified id. * * @param sessionId the session ID from the authentication client * @param id the id of the audio clip to be deleted. - * @exception StorageException if there is a problem with the XML-RPC - * call or no audio clip with the - * specified id exists. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call or no audio clip with the + * specified id exists. */ virtual void deleteAudioClip(Ptr::Ref sessionId, Ptr::Ref id) - throw (StorageException); + throw (XmlRpcException); /** * Return a list of all audio clips in the playlist store. @@ -438,12 +438,12 @@ class WebStorageClient : * * @param sessionId the session ID from the authentication client * @return a vector containing the playlists. - * @exception StorageException if there is a problem with the XML-RPC - * call. + * @exception XmlRpcException if there is a problem with the XML-RPC + * call. */ virtual Ptr::Ref> >::Ref getAllAudioClips(Ptr::Ref sessionId) const - throw (StorageException); + throw (XmlRpcException); /** @@ -451,11 +451,11 @@ class WebStorageClient : * * @return a vector containing the UniqueId's of the audio clips * in the storage after the reset. - * @exception std::logic_error if the server returns an error. + * @exception XmlRpcException if the server returns an error. */ Ptr::Ref> >::Ref reset(void) - throw (StorageException); + throw (XmlRpcException); }; diff --git a/livesupport/modules/storage/src/WebStorageClientTest.cxx b/livesupport/modules/storage/src/WebStorageClientTest.cxx index 760abe46f..58b40dc6a 100644 --- a/livesupport/modules/storage/src/WebStorageClientTest.cxx +++ b/livesupport/modules/storage/src/WebStorageClientTest.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.22 $ + Author : $Author: maroy $ + Version : $Revision: 1.23 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClientTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -182,7 +182,7 @@ WebStorageClientTest :: playlistTest(void) try { uniqueIdVector = wsc->reset(); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(uniqueIdVector->size() >= 3); @@ -203,7 +203,7 @@ WebStorageClientTest :: playlistTest(void) try{ playlist = wsc->createPlaylist(sessionId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(playlist); @@ -215,7 +215,7 @@ WebStorageClientTest :: playlistTest(void) try { exists = wsc->existsPlaylist(sessionId, playlistIdxx); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(exists); @@ -224,7 +224,7 @@ WebStorageClientTest :: playlistTest(void) try { exists = wsc->existsPlaylist(sessionId, playlistId77); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(!exists); @@ -234,7 +234,7 @@ WebStorageClientTest :: playlistTest(void) try { playlist = wsc->editPlaylist(sessionId, playlistIdxx); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(playlist); @@ -245,7 +245,7 @@ WebStorageClientTest :: playlistTest(void) } catch (XmlRpcMethodFaultException &e) { } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "editPlaylist() threw unexpected exception:\n"; CPPUNIT_FAIL(eMsg + e.what()); } @@ -255,7 +255,7 @@ WebStorageClientTest :: playlistTest(void) try { audioClip = wsc->getAudioClip(sessionId, audioClipId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } @@ -275,14 +275,14 @@ WebStorageClientTest :: playlistTest(void) CPPUNIT_ASSERT(throwAwayPlaylist->getPlaylength() ->total_seconds() == 0); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } try { wsc->savePlaylist(sessionId, playlist); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } @@ -292,7 +292,7 @@ WebStorageClientTest :: playlistTest(void) try { newPlaylist = wsc->getPlaylist(sessionId, playlistIdxx); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(newPlaylist); @@ -305,7 +305,7 @@ WebStorageClientTest :: playlistTest(void) try { newPlaylist = wsc->acquirePlaylist(sessionId, playlistIdxx); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(newPlaylist); @@ -331,7 +331,7 @@ WebStorageClientTest :: playlistTest(void) try { wsc->releasePlaylist(sessionId, newPlaylist); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(!newPlaylist->getUri()); @@ -341,14 +341,14 @@ WebStorageClientTest :: playlistTest(void) try { wsc->deletePlaylist(sessionId, playlistIdxx); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } try { exists = wsc->existsPlaylist(sessionId, playlistIdxx); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(!exists); @@ -366,7 +366,7 @@ WebStorageClientTest :: audioClipTest(void) try { uniqueIdVector = wsc->reset(); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(uniqueIdVector->size() >= 2); @@ -392,7 +392,7 @@ WebStorageClientTest :: audioClipTest(void) try { exists = wsc->existsAudioClip(sessionId, id01); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(exists); @@ -401,21 +401,21 @@ WebStorageClientTest :: audioClipTest(void) try { audioClip = wsc->getAudioClip(sessionId, id01); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } try { wsc->deleteAudioClip(sessionId, id01); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } try { exists = wsc->existsAudioClip(sessionId, id01); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(!exists); @@ -424,7 +424,7 @@ WebStorageClientTest :: audioClipTest(void) try { exists = wsc->existsAudioClip(sessionId, id77); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(!exists); @@ -441,7 +441,7 @@ WebStorageClientTest :: audioClipTest(void) try { wsc->storeAudioClip(sessionId, audioClip); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } @@ -451,7 +451,7 @@ WebStorageClientTest :: audioClipTest(void) try { CPPUNIT_ASSERT( wsc->existsAudioClip(sessionId, idxx)); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } @@ -459,7 +459,7 @@ WebStorageClientTest :: audioClipTest(void) try { newAudioClip = wsc->getAudioClip(sessionId, idxx); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } @@ -472,7 +472,7 @@ WebStorageClientTest :: audioClipTest(void) try { newAudioClip = wsc->acquireAudioClip(sessionId, idxx); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(newAudioClip->getUri()); @@ -482,7 +482,7 @@ WebStorageClientTest :: audioClipTest(void) try { wsc->releaseAudioClip(sessionId, newAudioClip); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(!newAudioClip->getUri()); @@ -493,7 +493,7 @@ WebStorageClientTest :: audioClipTest(void) try { audioClipVector = wsc->getAllAudioClips(sessionId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(audioClipVector->size() == 0); diff --git a/livesupport/products/scheduler/src/AddAudioClipToPlaylistMethod.cxx b/livesupport/products/scheduler/src/AddAudioClipToPlaylistMethod.cxx index d91e05e2f..fecd5c318 100644 --- a/livesupport/products/scheduler/src/AddAudioClipToPlaylistMethod.cxx +++ b/livesupport/products/scheduler/src/AddAudioClipToPlaylistMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.12 $ + Author : $Author: maroy $ + Version : $Revision: 1.13 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/AddAudioClipToPlaylistMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -111,7 +111,7 @@ AddAudioClipToPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try{ sessionId = XmlRpcTools::extractSessionId(parameters); } - catch (StorageException &e) { + catch (XmlRpcException &e) { XmlRpcTools::markError(errorId+20, "missing session ID argument", returnValue); @@ -122,7 +122,7 @@ AddAudioClipToPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try{ playlistId = XmlRpcTools::extractPlaylistId(parameters); } - catch (StorageException &e) { + catch (XmlRpcException &e) { XmlRpcTools::markError(errorId+2, "missing playlist ID argument", returnValue); return; @@ -132,7 +132,7 @@ AddAudioClipToPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try{ audioClipId = XmlRpcTools::extractAudioClipId(parameters); } - catch (StorageException &e) { + catch (XmlRpcException &e) { XmlRpcTools::markError(errorId+3, "missing audio clip ID argument", returnValue); return; @@ -142,7 +142,7 @@ AddAudioClipToPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try{ relativeOffset = XmlRpcTools::extractRelativeOffset(parameters); } - catch (StorageException &e) { + catch (XmlRpcException &e) { XmlRpcTools::markError(errorId+4, "missing relative offset argument", returnValue); return; @@ -157,7 +157,7 @@ AddAudioClipToPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { playlist = storage->getPlaylist(sessionId, playlistId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { XmlRpcTools::markError(errorId+5, "playlist not found", returnValue); return; @@ -174,7 +174,7 @@ AddAudioClipToPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { audioClip = storage->getAudioClip(sessionId, audioClipId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { XmlRpcTools::markError(errorId+7, "audio clip does not exist", returnValue); return; diff --git a/livesupport/products/scheduler/src/CreatePlaylistMethod.cxx b/livesupport/products/scheduler/src/CreatePlaylistMethod.cxx index 3edf36ab0..9aff0910a 100644 --- a/livesupport/products/scheduler/src/CreatePlaylistMethod.cxx +++ b/livesupport/products/scheduler/src/CreatePlaylistMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.9 $ + Author : $Author: maroy $ + Version : $Revision: 1.10 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/CreatePlaylistMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -127,7 +127,7 @@ CreatePlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { playlist = storage->createPlaylist(sessionId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "could not create playlist:\n"; eMsg += e.what(); XmlRpcTools :: markError(errorId+2, diff --git a/livesupport/products/scheduler/src/DeletePlaylistMethod.cxx b/livesupport/products/scheduler/src/DeletePlaylistMethod.cxx index a7cd9e34e..b3d1891a9 100644 --- a/livesupport/products/scheduler/src/DeletePlaylistMethod.cxx +++ b/livesupport/products/scheduler/src/DeletePlaylistMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.9 $ + Author : $Author: maroy $ + Version : $Revision: 1.10 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/Attic/DeletePlaylistMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -126,7 +126,7 @@ DeletePlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { playlist = storage->getPlaylist(sessionId, playlistId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "playlist not found:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+3, eMsg, returnValue); @@ -142,7 +142,7 @@ DeletePlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { storage->deletePlaylist(sessionId, playlistId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "playlist could not be deleted:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+5, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/DisplayAudioClipMethod.cxx b/livesupport/products/scheduler/src/DisplayAudioClipMethod.cxx index 6cc8377fc..7d3cc1775 100644 --- a/livesupport/products/scheduler/src/DisplayAudioClipMethod.cxx +++ b/livesupport/products/scheduler/src/DisplayAudioClipMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.7 $ + Author : $Author: maroy $ + Version : $Revision: 1.8 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/DisplayAudioClipMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -137,7 +137,7 @@ DisplayAudioClipMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { audioClip = storage->getAudioClip(sessionId, id); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "audio clip not found:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+3, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/DisplayAudioClipsMethod.cxx b/livesupport/products/scheduler/src/DisplayAudioClipsMethod.cxx index 505d6cd24..030c27a8d 100644 --- a/livesupport/products/scheduler/src/DisplayAudioClipsMethod.cxx +++ b/livesupport/products/scheduler/src/DisplayAudioClipsMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.6 $ + Author : $Author: maroy $ + Version : $Revision: 1.7 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/DisplayAudioClipsMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -117,7 +117,7 @@ DisplayAudioClipsMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { audioClipVector = storage->getAllAudioClips(sessionId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "getAllAudioClips returned error:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+2, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/DisplayPlaylistMethod.cxx b/livesupport/products/scheduler/src/DisplayPlaylistMethod.cxx index 7ea9536e0..456914868 100644 --- a/livesupport/products/scheduler/src/DisplayPlaylistMethod.cxx +++ b/livesupport/products/scheduler/src/DisplayPlaylistMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.8 $ + Author : $Author: maroy $ + Version : $Revision: 1.9 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/DisplayPlaylistMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -137,7 +137,7 @@ DisplayPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { playlist = storage->getPlaylist(sessionId, id); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "playlist not found:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+3, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/DisplayPlaylistsMethod.cxx b/livesupport/products/scheduler/src/DisplayPlaylistsMethod.cxx index 55df2a1ec..44ef8d330 100644 --- a/livesupport/products/scheduler/src/DisplayPlaylistsMethod.cxx +++ b/livesupport/products/scheduler/src/DisplayPlaylistsMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.7 $ + Author : $Author: maroy $ + Version : $Revision: 1.8 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/DisplayPlaylistsMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -118,7 +118,7 @@ DisplayPlaylistsMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { playlistVector = storage->getAllPlaylists(sessionId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "getAllPlaylists() returned error:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+2, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/OpenPlaylistForEditingMethod.cxx b/livesupport/products/scheduler/src/OpenPlaylistForEditingMethod.cxx index 1ed24cba6..9c35e9e0c 100644 --- a/livesupport/products/scheduler/src/OpenPlaylistForEditingMethod.cxx +++ b/livesupport/products/scheduler/src/OpenPlaylistForEditingMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.13 $ + Author : $Author: maroy $ + Version : $Revision: 1.14 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/OpenPlaylistForEditingMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -138,7 +138,7 @@ OpenPlaylistForEditingMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { playlist = storage->getPlaylist(sessionId, id); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "playlist not found:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+4, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/RemoveAudioClipFromPlaylistMethod.cxx b/livesupport/products/scheduler/src/RemoveAudioClipFromPlaylistMethod.cxx index 7423a5ebf..269ec0778 100644 --- a/livesupport/products/scheduler/src/RemoveAudioClipFromPlaylistMethod.cxx +++ b/livesupport/products/scheduler/src/RemoveAudioClipFromPlaylistMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.9 $ + Author : $Author: maroy $ + Version : $Revision: 1.10 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/RemoveAudioClipFromPlaylistMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -150,7 +150,7 @@ RemoveAudioClipFromPlaylistMethod :: execute( try { playlist = storage->getPlaylist(sessionId, playlistId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "playlist does not exist:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+4, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/RevertEditedPlaylistMethod.cxx b/livesupport/products/scheduler/src/RevertEditedPlaylistMethod.cxx index d1ca1ef5f..5cc53014c 100644 --- a/livesupport/products/scheduler/src/RevertEditedPlaylistMethod.cxx +++ b/livesupport/products/scheduler/src/RevertEditedPlaylistMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.7 $ + Author : $Author: maroy $ + Version : $Revision: 1.8 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/RevertEditedPlaylistMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -133,7 +133,7 @@ RevertEditedPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { playlist = storage->getPlaylist(sessionId, id); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "playlist not found:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+3, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/SavePlaylistMethod.cxx b/livesupport/products/scheduler/src/SavePlaylistMethod.cxx index 08ce443a4..b21863699 100644 --- a/livesupport/products/scheduler/src/SavePlaylistMethod.cxx +++ b/livesupport/products/scheduler/src/SavePlaylistMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.7 $ + Author : $Author: maroy $ + Version : $Revision: 1.8 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/SavePlaylistMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -133,7 +133,7 @@ SavePlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { playlist = storage->getPlaylist(sessionId, id); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "playlist not found:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+3, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/UpdateFadeInFadeOutMethod.cxx b/livesupport/products/scheduler/src/UpdateFadeInFadeOutMethod.cxx index a04b4f177..f0538e1e3 100644 --- a/livesupport/products/scheduler/src/UpdateFadeInFadeOutMethod.cxx +++ b/livesupport/products/scheduler/src/UpdateFadeInFadeOutMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.6 $ + Author : $Author: maroy $ + Version : $Revision: 1.7 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/UpdateFadeInFadeOutMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -174,7 +174,7 @@ UpdateFadeInFadeOutMethod :: execute( try { playlist = storage->getPlaylist(sessionId, playlistId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "playlist does not exist:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+6, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/UploadPlaylistMethod.cxx b/livesupport/products/scheduler/src/UploadPlaylistMethod.cxx index 1c37710d5..19cb8386e 100644 --- a/livesupport/products/scheduler/src/UploadPlaylistMethod.cxx +++ b/livesupport/products/scheduler/src/UploadPlaylistMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.11 $ + Author : $Author: maroy $ + Version : $Revision: 1.12 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/UploadPlaylistMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -146,7 +146,7 @@ UploadPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { playlist = storage->getPlaylist(sessionId, playlistId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "playlist not found:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+4, eMsg, returnValue); diff --git a/livesupport/products/scheduler/src/ValidatePlaylistMethod.cxx b/livesupport/products/scheduler/src/ValidatePlaylistMethod.cxx index efd81aa67..a0cc363d8 100644 --- a/livesupport/products/scheduler/src/ValidatePlaylistMethod.cxx +++ b/livesupport/products/scheduler/src/ValidatePlaylistMethod.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.8 $ + Author : $Author: maroy $ + Version : $Revision: 1.9 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/ValidatePlaylistMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -138,7 +138,7 @@ ValidatePlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, try { playlist = storage->getPlaylist(sessionId, playlistId); } - catch (StorageException &e) { + catch (XmlRpcException &e) { std::string eMsg = "playlist does not exist:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+3, eMsg, returnValue);