29#ifndef Pt_JsonRpc_Fault_h
30#define Pt_JsonRpc_Fault_h
32#include <Pt/JsonRpc/Api.h>
33#include <Pt/Remoting/Fault.h>
34#include <Pt/SerializationInfo.h>
61 Fault(
const std::string& msg,
int ec);
90 fault =
Fault(msg, code);
Fault(const char *msg, int rc)
Construct with message and error code.
~Fault()
Destructor.
Definition Fault.h:69
ErrorCodes
JSON-RPC fault error codes.
Definition Fault.h:51
@ InvalidRequest
Invalid JSON-RPC.
Definition Fault.h:53
@ ParseError
Parse error.
Definition Fault.h:52
@ MethodNotFound
Method not found in service.
Definition Fault.h:54
@ InvalidParameters
Invalid method parameters.
Definition Fault.h:55
@ InternalError
Internal error.
Definition Fault.h:56
int code() const
Returns the error code.
Definition Fault.h:74
Fault(const std::string &msg, int ec)
Construct with message and error code.
Remoting fault exception.
Definition Fault.h:43
Represents arbitrary types during serialization.
Definition SerializationInfo.h:59
void setString(const char *s)
Set to string value.
void getString(std::string &s, const TextCodec< Pt::Char, char > &codec) const
Get value as a string.
SerializationInfo & addMember(const std::string &name)
Add a struct member.
Definition SerializationInfo.h:449
const SerializationInfo & getMember(const std::string &name) const
Get a struct member.
Definition SerializationInfo.h:496
int_type int32_t
Signed 32-bit integer type.
Definition Api-Types.h:45
JSON-RPC 2.0 services and clients.
Core module.
Definition Allocator.h:33