moved LiveSupport::Storage::StorageException and derivatives to
LiveSupport::Core::XmlRpcException
This commit is contained in:
parent
a08d2b4dcd
commit
4eac8957fd
31 changed files with 1139 additions and 451 deletions
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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 <stdexcept>
|
||||
|
||||
#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<std::string>::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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
65
livesupport/modules/core/src/XmlRpcException.cxx
Normal file
65
livesupport/modules/core/src/XmlRpcException.cxx
Normal file
|
@ -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 <sstream>
|
||||
|
||||
#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());
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue