cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
Loading...
Searching...
No Matches
msgpack_rpc::clients::ServerException Class Reference

Class of exceptions specifying errors in servers. More...

#include <msgpack_rpc/clients/server_exception.h>

Inheritance diagram for msgpack_rpc::clients::ServerException:
Collaboration diagram for msgpack_rpc::clients::ServerException:

Public Member Functions

 ServerException (const ServerException &) noexcept
 Copy constructor.
 ServerException (msgpack::object object, std::shared_ptr< msgpack::zone > zone)
 Constructor.
 ServerException (ServerException &&) noexcept
 Move constructor.
 ~ServerException () noexcept override
 Destructor.
template<typename T>
error_as () const
 Get the error.
const msgpack::object & object () const noexcept
 Get the object in msgpack library.
ServerExceptionoperator= (const ServerException &) noexcept
 Copy assignment operator.
ServerExceptionoperator= (ServerException &&) noexcept
 Move assignment operator.

Private Attributes

msgpack::object object_
 Object in msgpack library specifying the error.
std::shared_ptr< msgpack::zone > zone_
 Zone in msgpack library.

Detailed Description

Class of exceptions specifying errors in servers.

Exceptions of this class can be thrown by Client::call, CallFuture::get_result, and CallFuture::get_result_within functions.

Examples
more_client.cpp.

Definition at line 38 of file server_exception.h.

Constructor & Destructor Documentation

◆ ServerException()

msgpack_rpc::clients::ServerException::ServerException ( msgpack::object object,
std::shared_ptr< msgpack::zone > zone )

Constructor.

Parameters
[in]objectObject in msgpack library specifying the error.
[in]zoneZone in msgpack library.

Definition at line 31 of file server_exception.cpp.

Member Function Documentation

◆ error_as()

template<typename T>
T msgpack_rpc::clients::ServerException::error_as ( ) const
inlinenodiscard

Get the error.

Template Parameters
TType.
Returns
Error.

Definition at line 66 of file server_exception.h.

◆ object()

const msgpack::object & msgpack_rpc::clients::ServerException::object ( ) const
nodiscardnoexcept

Get the object in msgpack library.

Returns
Object in msgpack library.

Definition at line 39 of file server_exception.cpp.

◆ operator=() [1/2]

ServerException & msgpack_rpc::clients::ServerException::operator= ( const ServerException & )
defaultnoexcept

Copy assignment operator.

Returns
This.

◆ operator=() [2/2]

ServerException & msgpack_rpc::clients::ServerException::operator= ( ServerException && )
defaultnoexcept

Move assignment operator.

Returns
This.

Member Data Documentation

◆ object_

msgpack::object msgpack_rpc::clients::ServerException::object_
private

Object in msgpack library specifying the error.

Definition at line 107 of file server_exception.h.

◆ zone_

std::shared_ptr<msgpack::zone> msgpack_rpc::clients::ServerException::zone_
private

Zone in msgpack library.

Definition at line 104 of file server_exception.h.


The documentation for this class was generated from the following files: