mirror of
https://github.com/boostorg/system.git
synced 2025-07-30 04:27:14 +02:00
Merge branch 'develop' into feature/std-category-2
This commit is contained in:
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include <boost/system/errc.hpp>
|
#include <boost/system/errc.hpp>
|
||||||
#include <boost/system/detail/error_code.hpp>
|
#include <boost/system/detail/error_code.hpp>
|
||||||
#include <boost/system/detail/snprintf.hpp>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -26,14 +25,6 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static std::string to_string( int v )
|
|
||||||
{
|
|
||||||
char buffer[ 32 ];
|
|
||||||
detail::snprintf( buffer, sizeof( buffer ), "%d", v );
|
|
||||||
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::string build_message( char const * prefix, error_code const & ec )
|
static std::string build_message( char const * prefix, error_code const & ec )
|
||||||
{
|
{
|
||||||
std::string r;
|
std::string r;
|
||||||
@ -51,23 +42,8 @@ private:
|
|||||||
r += " [";
|
r += " [";
|
||||||
r += ec.to_string();
|
r += ec.to_string();
|
||||||
r += " at ";
|
r += " at ";
|
||||||
|
r += ec.location().to_string();
|
||||||
boost::source_location loc = ec.location();
|
r += "]";
|
||||||
|
|
||||||
r += loc.file_name();
|
|
||||||
|
|
||||||
r += ':';
|
|
||||||
r += to_string( loc.line() );
|
|
||||||
|
|
||||||
if( loc.column() != 0 )
|
|
||||||
{
|
|
||||||
r += ':';
|
|
||||||
r += to_string( loc.column() );
|
|
||||||
}
|
|
||||||
|
|
||||||
r += " in function '";
|
|
||||||
r += loc.function_name();
|
|
||||||
r += "\']";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
Reference in New Issue
Block a user