libfswatch  1.9.3
Public Member Functions | List of all members
fsw::libfsw_exception Class Reference

Base exception of the libfswatch library. More...

#include <libfswatch_exception.hpp>

Inheritance diagram for fsw::libfsw_exception:

Public Member Functions

 libfsw_exception (std::string cause, int code=FSW_ERR_UNKNOWN_ERROR)
 Constructs an exception with the specified cause and error code. More...
 
virtual const char * what () const noexcept
 Gets the error message. More...
 
virtual int error_code () const noexcept
 Gets the error code. More...
 
virtual ~libfsw_exception () noexcept
 Destructs an instance of this class.
 
 operator int () const noexcept
 Gets the error code.
 

Detailed Description

Base exception of the libfswatch library.

An instance of this class stores an error message and an integer error code.

Constructor & Destructor Documentation

fsw::libfsw_exception::libfsw_exception ( std::string  cause,
int  code = FSW_ERR_UNKNOWN_ERROR 
)

Constructs an exception with the specified cause and error code.

Parameters
causeThe error message.
codeThe error code.

Member Function Documentation

int fsw::libfsw_exception::error_code ( ) const
virtualnoexcept

Gets the error code.

Returns
The error code.
const char * fsw::libfsw_exception::what ( ) const
virtualnoexcept

Gets the error message.

Returns
The error message.

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