Menu

[r3316]: / advanced / src / cpp / fault.cpp  Maximize  Restore  History

Download this file

36 lines (27 with data), 729 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <string>
#include "xmlrpc-c/girerr.hpp"
using girerr::error;
#include "xmlrpc-c/base.hpp"
using namespace std;
namespace xmlrpc_c {
fault::fault() : valid(false) {};
fault::fault(string const _description,
xmlrpc_c::fault::code_t const _code
) :
valid(true),
code(_code),
description(_description)
{}
xmlrpc_c::fault::code_t
fault::getCode() const {
if (!valid)
throw(error("Attempt to access placeholder xmlrpc_c::fault object"));
return this->code;
}
string
fault::getDescription() const {
if (!valid)
throw(error("Attempt to access placeholder xmlrpc_c::fault object"));
return this->description;
}
} // namespace
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.