Fix error_code output.

This commit is contained in:
chris_kohlhoff 2007-02-14 13:28:48 +00:00
parent 67a063a6f3
commit f923e31101
8 changed files with 10 additions and 10 deletions

View File

@ -58,7 +58,7 @@ private:
} }
else else
{ {
std::cout << "Error: " << err << "\n"; std::cout << "Error: " << err.message() << "\n";
} }
} }

View File

@ -67,7 +67,7 @@ public:
// An error occurred. Log it and return. Since we are not starting a new // An error occurred. Log it and return. Since we are not starting a new
// operation the io_service will run out of work to do and the client will // operation the io_service will run out of work to do and the client will
// exit. // exit.
std::cerr << e << std::endl; std::cerr << e.message() << std::endl;
} }
} }
@ -95,7 +95,7 @@ public:
else else
{ {
// An error occurred. // An error occurred.
std::cerr << e << std::endl; std::cerr << e.message() << std::endl;
} }
// Since we are not starting a new operation the io_service will run out of // Since we are not starting a new operation the io_service will run out of

View File

@ -84,7 +84,7 @@ public:
// An error occurred. Log it and return. Since we are not starting a new // An error occurred. Log it and return. Since we are not starting a new
// accept operation the io_service will run out of work to do and the // accept operation the io_service will run out of work to do and the
// server will exit. // server will exit.
std::cerr << e << std::endl; std::cerr << e.message() << std::endl;
} }
} }

View File

@ -51,7 +51,7 @@ void connect_handler(const asio::error_code& e, debug_stream_socket* s,
} }
else else
{ {
std::cerr << e << std::endl; std::cerr << e.message() << std::endl;
} }
} }

View File

@ -36,7 +36,7 @@ public:
{ {
if (err) if (err)
{ {
std::cout << "Accept error: " << err << "\n"; std::cout << "Accept error: " << err.message() << "\n";
} }
else else
{ {

View File

@ -36,7 +36,7 @@ public:
{ {
if (err) if (err)
{ {
std::cout << "Connect error: " << err << "\n"; std::cout << "Connect error: " << err.message() << "\n";
} }
else else
{ {

View File

@ -37,7 +37,7 @@ public:
{ {
if (err) if (err)
{ {
std::cout << "Receive error: " << err << "\n"; std::cout << "Receive error: " << err.message() << "\n";
} }
else else
{ {

View File

@ -33,7 +33,7 @@ public:
{ {
if (err) if (err)
{ {
std::cout << "Accept error: " << err << "\n"; std::cout << "Accept error: " << err.message() << "\n";
} }
else else
{ {
@ -51,7 +51,7 @@ public:
{ {
if (err) if (err)
{ {
std::cout << "Receive error: " << err << "\n"; std::cout << "Receive error: " << err.message() << "\n";
} }
else else
{ {