Boost Exception

errinfo_errno

#include <boost/exception/errinfo_errno.hpp>

#include <boost/exception/error_info.hpp>
#include <errno.h>

namespace
boost
    {
    typedef error_info<struct errinfo_errno_,int> errinfo_errno;
    }

This type is designed to be used as a standard error_info instance for transporting a relevant errno value in exceptions deriving from boost::exception.