Browse Source

[2916] corrected type of exception thrown from asiolib

error_code wasn't an exception type; it should have been system_error.
JINMEI Tatuya 12 years ago
parent
commit
03ef197742
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/lib/asiolink/local_socket.cc

+ 2 - 2
src/lib/asiolink/local_socket.cc

@@ -51,10 +51,10 @@ LocalSocket::LocalSocket(IOService& io_service, int fd) :
 {
     try {
         impl_ = new Impl(io_service, fd);
-    } catch (const asio::error_code& error) {
+    } catch (const asio::system_error& error) {
         // Catch and convert any exception from asio's constructor
         isc_throw(IOError, "failed to open local socket with FD " << fd
-                  << ": " << error.message());
+                  << ": " << error.what());
     }
 }