]> Creatis software - gdcm.git/commitdiff
ENH: gdcmDebugMacro is now different from gdcmVerboseMacro as now it also display...
authormalaterre <malaterre>
Wed, 12 Jan 2005 21:53:32 +0000 (21:53 +0000)
committermalaterre <malaterre>
Wed, 12 Jan 2005 21:53:32 +0000 (21:53 +0000)
src/gdcmDebug.h

index 7ad5767d34a2a8887fa45835dafcef10e3a98657..e35027af280aff272f4cd715d80598c93238b8a3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDebug.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/11 17:54:10 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2005/01/12 21:53:32 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -23,6 +23,7 @@
 
 #include <sstream>
 #include <assert.h>
+#include <errno.h>
 
 namespace gdcm 
 {
@@ -86,7 +87,8 @@ public:
    std::ostringstream osmacro;                             \
    osmacro << "Debug: In " __FILE__ ", line " << __LINE__  \
            << ", function " << GDCM_FUNCTION << '\n'       \
-           << msg << "\n\n";                               \
+           << "Last system error was: " << strerror(errno) \
+           << '\n' << msg << "\n\n";                       \
    std::cerr << osmacro.str() << std::endl;                \
    }                                                       \
 }