4 #ifndef __FRIOS_POSIX_ERROR_HPP__
5 #define __FRIOS_POSIX_ERROR_HPP__
15 :
public std::runtime_error
18 static std::string _fmt_msg(
int error_code)
20 const std::size_t size = 1023;
22 return std::string(strerror_r(error_code, buffer, size));
27 : std::runtime_error(_fmt_msg(error_code))
34 #endif // include guard
Base class for all POSIX exceptions.
Definition: error.hpp:14
error(int error_code)
Construction from POSIX error code.
Definition: error.hpp:26