Apache Ignite C++ Client
Loading...
Searching...
No Matches
ignite::ignite_error Class Reference

#include <ignite_error.h>

Inheritance diagram for ignite::ignite_error:

Public Member Functions

 ignite_error (std::string message) noexcept
 ignite_error (std::string message, std::int32_t flags) noexcept
 ignite_error (error::code code, std::string message) noexcept
 ignite_error (error::code code, std::string message, std::exception_ptr cause) noexcept
 ignite_error (error::code code, std::string message, uuid trace_id, std::optional< std::string > java_st) noexcept
char const * what () const noexcept override
const std::string & what_str () const noexcept
error::code get_status_code () const noexcept
uuid get_trace_id () const noexcept
const std::optional< std::string > & get_java_stack_trace () const noexcept
std::exception_ptr get_cause () const noexcept
std::int32_t get_flags () const noexcept
template<typename T>
void add_extra (std::string key, T value)
template<typename T>
std::optional< T > get_extra (const std::string &key) const noexcept

Detailed Description

Ignite Error.

Constructor & Destructor Documentation

◆ ignite_error() [1/5]

ignite::ignite_error::ignite_error ( std::string message)
inlineexplicitnoexcept

Constructor.

Parameters
messageMessage.

◆ ignite_error() [2/5]

ignite::ignite_error::ignite_error ( std::string message,
std::int32_t flags )
inlineexplicitnoexcept

Constructor.

Parameters
messageMessage.

◆ ignite_error() [3/5]

ignite::ignite_error::ignite_error ( error::code code,
std::string message )
inlineexplicitnoexcept

Constructor.

Parameters
codeStatus code.
messageMessage.

◆ ignite_error() [4/5]

ignite::ignite_error::ignite_error ( error::code code,
std::string message,
std::exception_ptr cause )
inlineexplicitnoexcept

Constructor.

Parameters
codeStatus code.
messageMessage.
causeError cause.

◆ ignite_error() [5/5]

ignite::ignite_error::ignite_error ( error::code code,
std::string message,
uuid trace_id,
std::optional< std::string > java_st )
inlineexplicitnoexcept

Constructor.

Parameters
codeStatus code.
messageMessage.
trace_idTrace ID.
java_stJava stack trace.

Member Function Documentation

◆ add_extra()

template<typename T>
void ignite::ignite_error::add_extra ( std::string key,
T value )
inline

Add extra information.

Template Parameters
TExtra type.
Parameters
keyKey.
valuevalue.

◆ get_cause()

std::exception_ptr ignite::ignite_error::get_cause ( ) const
inlinenodiscardnoexcept

Get error cause.

Returns
Error cause. Can be empty.

◆ get_extra()

template<typename T>
std::optional< T > ignite::ignite_error::get_extra ( const std::string & key) const
inlinenodiscardnoexcept

Get extra information by the key.

Returns
Extra.

◆ get_flags()

std::int32_t ignite::ignite_error::get_flags ( ) const
inlinenodiscardnoexcept

Get flags. Internal method.

Returns
Flags.

◆ get_java_stack_trace()

const std::optional< std::string > & ignite::ignite_error::get_java_stack_trace ( ) const
inlinenodiscardnoexcept

Get Java side stack trace. Can be empty if the error generated on the client side or if the server side option for sending stack traces to the client is disabled.

Returns
Java side stack trace.

◆ get_status_code()

error::code ignite::ignite_error::get_status_code ( ) const
inlinenodiscardnoexcept

Get status code.

Returns
Status code.

◆ get_trace_id()

uuid ignite::ignite_error::get_trace_id ( ) const
inlinenodiscardnoexcept

Get trace ID. Trace ID can be used to track the same error in different part of product and different logs (e.g., server and client)

Returns
Trace ID.

◆ what()

char const * ignite::ignite_error::what ( ) const
inlinenodiscardoverridenoexcept

Get an error message.

◆ what_str()

const std::string & ignite::ignite_error::what_str ( ) const
inlinenodiscardnoexcept

Get the error message as std::string.


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