Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Boost Exception

boost/exception/errinfo_errno.hpp

Synopsis

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

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