diff Core/OrthancException.h @ 2954:d924f9bb61cc

taking advantage of details in OrthancException
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 Dec 2018 14:35:34 +0100
parents 4ceb9bf7b00c
children 74a5a7fd6e0e
line wrap: on
line diff
--- a/Core/OrthancException.h	Mon Dec 03 11:49:39 2018 +0100
+++ b/Core/OrthancException.h	Mon Dec 03 14:35:34 2018 +0100
@@ -78,7 +78,9 @@
       httpStatus_(ConvertErrorCodeToHttpStatus(errorCode)),
       details_(new std::string(details))
     {
+#if ORTHANC_ENABLE_LOGGING == 1
       LOG(ERROR) << EnumerationToString(errorCode_) << ": " << details;
+#endif
     }
 
     OrthancException(ErrorCode errorCode,
@@ -95,7 +97,9 @@
       httpStatus_(httpStatus),
       details_(new std::string(details))
     {
+#if ORTHANC_ENABLE_LOGGING == 1
       LOG(ERROR) << EnumerationToString(errorCode_) << ": " << details;
+#endif
     }
 
     ErrorCode GetErrorCode() const