Parcourir la source

[2916] corrected type of exception thrown from asiolib

error_code wasn't an exception type; it should have been system_error.
JINMEI Tatuya il y a 12 ans
Parent
commit
03ef197742
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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());
     }
 }