]> Creatis software - gdcm.git/commitdiff
BUG: A test that cannot open an image SHOULD fail
authormalaterre <malaterre>
Sun, 24 Apr 2005 20:54:45 +0000 (20:54 +0000)
committermalaterre <malaterre>
Sun, 24 Apr 2005 20:54:45 +0000 (20:54 +0000)
src/gdcmDocument.cxx

index 98940dc270122baa7a34bb8fd8ecf3e1fdab6943..aa4f965d2220ac669b08746698d81c48b15f05ac 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/04/22 12:59:58 $
-  Version:   $Revision: 1.235 $
+  Date:      $Date: 2005/04/24 20:54:45 $
+  Version:   $Revision: 1.236 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -427,10 +427,9 @@ std::ifstream *Document::OpenFile()
    Fp = new std::ifstream(Filename.c_str(), std::ios::in | std::ios::binary);
    if( ! *Fp )
    {
-      gdcmDebugMacro( "Cannot open file: " << Filename.c_str());
+      gdcmErrorMacro( "Cannot open file: " << Filename.c_str());
       delete Fp;
-      Fp = 0;
-      return 0;
+      exit(1);
    }
  
    uint16_t zero = 0;