BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
XmlRpcException.h
Go to the documentation of this file.
1
2#ifndef _XMLRPCEXCEPTION_H_
3#define _XMLRPCEXCEPTION_H_
4//
5// XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
6//
7#if defined( _MSC_VER )
8# pragma warning( disable : 4786 ) // identifier was truncated in debug info
9#endif
10
11#ifndef MAKEDEPEND
12# include <string>
13#endif
14
15namespace XmlRpc {
16
17 //! A class representing an error.
18 //! If server methods throw this exception, a fault response is returned
19 //! to the client.
21 public:
22 //! Constructor
23 //! @param message A descriptive error message
24 //! @param code An integer error code
25 XmlRpcException( const std::string& message, int code = -1 )
26 : _message( message ), _code( code ) {}
27
28 //! Return the error message.
29 const std::string& getMessage() const { return _message; }
30
31 //! Return the error code.
32 int getCode() const { return _code; }
33
34 private:
35 std::string _message;
36 int _code;
37 };
38
39} // namespace XmlRpc
40
41#endif // _XMLRPCEXCEPTION_H_
int getCode() const
Return the error code.
const std::string & getMessage() const
Return the error message.
XmlRpcException(const std::string &message, int code=-1)