mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-07 22:03:50 +00:00
36 lines
729 B
C++
36 lines
729 B
C++
|
#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
|