lib45d
45Drives C++ Library Development Documentation
Public Member Functions | Private Attributes | List of all members
ffd::Exception Class Reference

Exceptions thrown by this library. More...

#include <45d/Exceptions.hpp>

Inheritance diagram for ffd::Exception:
Inheritance graph
[legend]

Public Member Functions

 Exception (const std::string &what, int err=0) noexcept
 Construct a new Exception object. More...
 
const char * what (void) const noexcept
 Return string containing explanation message. More...
 
int get_errno (void) const noexcept
 Get the errno relating to the error, 0 if not set. More...
 

Private Attributes

std::string what_
 String containing explanation message.
 
int errno_
 Optionally save errno if applicable.
 

Detailed Description

Exceptions thrown by this library.

Constructor & Destructor Documentation

◆ Exception()

ffd::Exception::Exception ( const std::string &  what,
int  err = 0 
)
inlinenoexcept

Construct a new Exception object.

Parameters
whatString containing explanation message
errOptionally pass errno

Member Function Documentation

◆ get_errno()

int ffd::Exception::get_errno ( void  ) const
inlinenoexcept

Get the errno relating to the error, 0 if not set.

Returns
int

◆ what()

const char* ffd::Exception::what ( void  ) const
inlinenoexcept

Return string containing explanation message.

Returns
std::string

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