From: jpr Date: Wed, 7 Sep 2005 10:42:30 +0000 (+0000) Subject: Add some verbosity when something wrong occurs X-Git-Tag: Version1.2.bp~99 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0ed7d52694776c5af4b91e48f003caed7da4d41f;p=gdcm.git Add some verbosity when something wrong occurs --- diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index e1abb25b..553f2a87 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2005/09/07 08:55:22 $ - Version: $Revision: 1.275 $ + Date: $Date: 2005/09/07 10:42:30 $ + Version: $Revision: 1.276 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -266,10 +266,18 @@ bool Document::DoTheLoadingDocumentJob( ) { d = GetDocEntry( (*it).Group, (*it).Elem); + gdcmWarningMacro( "Force Load " << std::hex + << (*it).Group << "|" <<(*it).Elem ); + if ( d == NULL) + { + gdcmWarningMacro( "You asked toForce Load " << std::hex + << (*it).Group <<"|"<< (*it).Elem + << " that doesn't exist" ); continue; + } - if ( dynamic_cast(d) ) + if ( dynamic_cast(d) ) { LoadDocEntry(d, true); continue; @@ -283,7 +291,8 @@ bool Document::DoTheLoadingDocumentJob( ) if ( dynamic_cast(d) ) { - gdcmWarningMacro( "You cannot 'ForceLoad' a SeqEntry "); + gdcmWarningMacro( "You cannot 'ForceLoad' a SeqEntry :" << std::hex + << (*it).Group <<"|"<< (*it).Elem ); continue; } }