From 9ef9bdfa568dd06f6ac7b32833664dbbc8b4d755 Mon Sep 17 00:00:00 2001 From: David Mayerich Date: Wed, 6 Jun 2018 18:09:18 -0500 Subject: [PATCH] generated an error message for unsupported ENVI data types --- stim/envi/envi.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/stim/envi/envi.h b/stim/envi/envi.h index 2552943..bbff889 100644 --- a/stim/envi/envi.h +++ b/stim/envi/envi.h @@ -374,7 +374,10 @@ public: return ((bsq*)file)->open(fname, header.samples, header.lines, header.bands, header.header_offset, header.wavelength); } else + { + std::cout << "ERROR: The specified data format (" << header.data_type << ") is not supported" << std::endl; return false; + } } else if(header.interleave == envi_header::BIL) { //if the infile is bil file @@ -384,8 +387,10 @@ public: else if(header.data_type == envi_header::float64) { return ((bil*)file)->open(fname, header.samples, header.lines, header.bands, header.header_offset, header.wavelength); } - else + { + std::cout << "ERROR: The specified data format (" << header.data_type << ") is not supported" << std::endl; return false; + } } else if(header.interleave == envi_header::BIP) { //if the infile is bip file @@ -395,8 +400,10 @@ public: else if(header.data_type == envi_header::float64) { return ((bip*)file)->open(fname, header.samples, header.lines, header.bands, header.header_offset, header.wavelength); } - else + { + std::cout << "ERROR: The specified data format (" << header.data_type << ") is not supported" << std::endl; return false; + } } return true; -- libgit2 0.21.4