From: malaterre Date: Wed, 26 Oct 2005 14:47:06 +0000 (+0000) Subject: ENH: Get rid of errno is op is success X-Git-Tag: OpenJPEG.Version1.2~146 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=bb294da1f70effa830c566768292b672e625a3ec;p=gdcm.git ENH: Get rid of errno is op is success --- diff --git a/src/gdcmDebug.h b/src/gdcmDebug.h index d3144f6a..861234e3 100644 --- a/src/gdcmDebug.h +++ b/src/gdcmDebug.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.h,v $ Language: C++ - Date: $Date: 2005/10/18 12:58:27 $ - Version: $Revision: 1.43 $ + Date: $Date: 2005/10/26 14:47:06 $ + Version: $Revision: 1.44 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -111,9 +111,10 @@ public: { \ std::ostringstream osmacro; \ osmacro << "Debug: In " __FILE__ ", line " << __LINE__ \ - << ", function " << GDCM_FUNCTION << '\n' \ - << "Last system error was: " << strerror(errno) \ - << '\n' << msg << "\n\n"; \ + << ", function " << GDCM_FUNCTION << '\n'; \ + if( errno ) \ + osmacro << "Last system error was: " << \ + strerror(errno) << '\n' << msg << "\n\n"; \ if( Debug::GetDebugToFile() ) \ Debug::GetDebugFile() << osmacro.str() << std::endl; \ else \