Example #1
0
 //Usage hint:
 //if( c_function(....)!=0 )
 //    BOOST_THROW_EXCEPTION(
 //        failure() <<
 //        errinfo_errno(errno) <<
 //        errinfo_api_function("c_function") );
 inline
 std::string
 to_string( errinfo_errno const & e )
     {
     std::ostringstream tmp;
     int v=e.value();
     tmp  << '[' << error_info_name(e) << "] = " << v << ", \"" << strerror(v) << "\"\n";
     return tmp.str();
     }
Example #2
0
 inline
 std::string
 to_string( error_info<Tag,T> const & x )
     {
     return '[' + error_info_name(x) + "] = " + to_string_stub(x.value()) + '\n';
     }