From 993ab2aadc360eb1a0c97b6b19ef4f57628def23 Mon Sep 17 00:00:00 2001 From: malaterre Date: Sun, 24 Apr 2005 20:54:45 +0000 Subject: [PATCH] BUG: A test that cannot open an image SHOULD fail --- src/gdcmDocument.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 98940dc2..aa4f965d 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/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; -- 2.45.1