From 0b9597e74e3df1c0abdc4078573dceb3a07c245e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 16 Aug 2022 18:26:50 +0200 Subject: [PATCH] better error message/simpler code --- src/grid/VTI.f90 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/grid/VTI.f90 b/src/grid/VTI.f90 index 600624a16..5c3cb864a 100644 --- a/src/grid/VTI.f90 +++ b/src/grid/VTI.f90 @@ -38,8 +38,6 @@ function VTI_readDataset_int(fileContent,label) result(dataset) fileContent,label) dataset = as_Int(base64Str,headerType,compressed,dataType) - if (.not. allocated(dataset)) call IO_error(error_ID = 844, ext_msg='dataset "'//label//'" not found') - end function VTI_readDataset_int @@ -63,8 +61,6 @@ function VTI_readDataset_real(fileContent,label) result(dataset) fileContent,label) dataset = as_real(base64Str,headerType,compressed,dataType) - if (.not. allocated(dataset)) call IO_error(error_ID = 844, ext_msg='dataset "'//label//'" not found') - end function VTI_readDataset_real @@ -133,6 +129,8 @@ subroutine VTI_readDataset_raw(base64Str,dataType,headerType,compressed, & end do outer + if (.not. allocated(base64Str)) call IO_error(error_ID = 844, ext_msg='dataset "'//label//'" not found') + end subroutine VTI_readDataset_raw