26 #ifndef LIBFSW_EXCEPTION_H
27 # define LIBFSW_EXCEPTION_H
29 # include "../c/error.h"
58 virtual const char *
what()
const noexcept;
75 explicit operator int()
const noexcept;
78 const std::string cause;
Main namespace of libfswatch.
Definition: event.cpp:23
libfsw_exception(std::string cause, int code=FSW_ERR_UNKNOWN_ERROR)
Constructs an exception with the specified cause and error code.
Definition: libfswatch_exception.cpp:23
Base exception of the libfswatch library.
Definition: libfswatch_exception.hpp:41
virtual ~libfsw_exception() noexcept
Destructs an instance of this class.
Definition: libfswatch_exception.cpp:43
virtual int error_code() const noexcept
Gets the error code.
Definition: libfswatch_exception.cpp:33
virtual const char * what() const noexcept
Gets the error message.
Definition: libfswatch_exception.cpp:28
#define FSW_ERR_UNKNOWN_ERROR
Definition: error.h:37