changeset 3330:10e2b9f4162f

more details in errors
author Alain Mazy <alain@mazy.be>
date Thu, 21 Mar 2019 16:37:35 +0100
parents 98cd69135999
children a600e5e8bd1c
files Core/DicomNetworking/DicomServer.cpp Core/HttpServer/HttpServer.cpp
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Core/DicomNetworking/DicomServer.cpp	Thu Mar 21 12:04:39 2019 +0100
+++ b/Core/DicomNetworking/DicomServer.cpp	Thu Mar 21 16:37:35 2019 +0100
@@ -328,7 +328,7 @@
     if (cond.bad())
     {
       throw OrthancException(ErrorCode_DicomPortInUse,
-                             "cannot create network: " + std::string(cond.text()));
+                             " (port = " + boost::lexical_cast<std::string>(port_) + ") cannot create network: " + std::string(cond.text()));
     }
 
     continue_ = true;
--- a/Core/HttpServer/HttpServer.cpp	Thu Mar 21 12:04:39 2019 +0100
+++ b/Core/HttpServer/HttpServer.cpp	Thu Mar 21 16:37:35 2019 +0100
@@ -1056,7 +1056,8 @@
 
       if (!pimpl_->context_)
       {
-        throw OrthancException(ErrorCode_HttpPortInUse);
+        throw OrthancException(ErrorCode_HttpPortInUse,
+                               " (port = " + boost::lexical_cast<std::string>(port_) + ")");
       }
 
       LOG(WARNING) << "HTTP server listening on port: " << GetPortNumber()