The Battle for Wesnoth  1.15.1+dev
Public Member Functions | Private Attributes | List of all members
libc_error Class Reference

Exception type used to propagate C runtime errors across functions. More...

#include <libc_error.hpp>

Inheritance diagram for libc_error:
Inheritance graph

Public Member Functions

 libc_error ()
 
virtual ~libc_error () noexcept
 
int num () const
 Returns the value of errno at the time the exception was thrown. More...
 
const std::string & desc () const
 Returns an explanatory string describing the runtime error alone. More...
 
const char * what () const noexcept
 Returns an explanatory string describing the exception. More...
 

Private Attributes

int e_
 
std::string desc_
 
std::string msg_
 

Detailed Description

Exception type used to propagate C runtime errors across functions.

Definition at line 18 of file libc_error.hpp.

Constructor & Destructor Documentation

◆ libc_error()

libc_error::libc_error ( )
inline

Definition at line 21 of file libc_error.hpp.

◆ ~libc_error()

virtual libc_error::~libc_error ( )
inlinevirtualnoexcept

Definition at line 28 of file libc_error.hpp.

Member Function Documentation

◆ desc()

const std::string& libc_error::desc ( ) const
inline

Returns an explanatory string describing the runtime error alone.

Definition at line 39 of file libc_error.hpp.

References desc_.

◆ num()

int libc_error::num ( ) const
inline

Returns the value of errno at the time the exception was thrown.

Definition at line 33 of file libc_error.hpp.

References e_.

◆ what()

const char* libc_error::what ( ) const
inlinenoexcept

Returns an explanatory string describing the exception.

Definition at line 45 of file libc_error.hpp.

References msg_.

Member Data Documentation

◆ desc_

std::string libc_error::desc_
private

Definition at line 52 of file libc_error.hpp.

Referenced by desc().

◆ e_

int libc_error::e_
private

Definition at line 51 of file libc_error.hpp.

Referenced by num().

◆ msg_

std::string libc_error::msg_
private

Definition at line 53 of file libc_error.hpp.

Referenced by what().


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