Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::ErrorCode Class Reference

Error code class. More...

#include <ErrorCode.h>

Public Member Functions

 ErrorCode (int32_t error, std::string msg) noexcept
 Constructor.
 
int32_t value () const noexcept
 Get error code.
 
const std::string & message () const noexcept
 Get error description.
 
 operator bool () const noexcept
 

Private Attributes

int32_t error
 
std::string msg
 

Detailed Description

Error code class.

Constructor & Destructor Documentation

◆ ErrorCode()

sese::ErrorCode::ErrorCode ( int32_t error,
std::string msg )
noexcept

Constructor.

Parameters
errorError code
msgError description

Member Function Documentation

◆ message()

const std::string & sese::ErrorCode::message ( ) const
inlinenodiscardnoexcept

Get error description.

Returns
Error description

References msg.

◆ operator bool()

sese::ErrorCode::operator bool ( ) const
inlineexplicitnoexcept

References value().

◆ value()

int32_t sese::ErrorCode::value ( ) const
inlinenodiscardnoexcept

Get error code.

Returns
Error code

References error.

Referenced by operator bool().

Member Data Documentation

◆ error

int32_t sese::ErrorCode::error
private

Referenced by value().

◆ msg

std::string sese::ErrorCode::msg
private

Referenced by message().


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