improved error messages for NeXus file reading. Especially for the case of HDF4/HDF5 <-> NeXus version issues.
This commit is contained in:
parent
67848f5724
commit
fe537efa6e
8
src/external/nexus/PNeXus.cpp
vendored
8
src/external/nexus/PNeXus.cpp
vendored
@ -2045,7 +2045,14 @@ int PNeXus::ReadFile(const char *fileName)
|
|||||||
// close file
|
// close file
|
||||||
NXclose(&fFileHandle);
|
NXclose(&fFileHandle);
|
||||||
|
|
||||||
|
std::stringstream ss;
|
||||||
switch (fIdfVersion) {
|
switch (fIdfVersion) {
|
||||||
|
case 0:
|
||||||
|
fErrorCode = PNEXUS_IDF_NOT_IMPLEMENTED;
|
||||||
|
ss << ">> **ERROR** update of the HDF4/HDF5 libs without recompilation of the NeXus lib?";
|
||||||
|
fErrorMsg = ss.str();
|
||||||
|
status = NX_ERROR;
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
status = ReadFileIdf1();
|
status = ReadFileIdf1();
|
||||||
if (status != NX_OK) {
|
if (status != NX_OK) {
|
||||||
@ -2062,7 +2069,6 @@ int PNeXus::ReadFile(const char *fileName)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fErrorCode = PNEXUS_IDF_NOT_IMPLEMENTED;
|
fErrorCode = PNEXUS_IDF_NOT_IMPLEMENTED;
|
||||||
std::stringstream ss;
|
|
||||||
ss << ">> **ERROR** idf_version=" << fIdfVersion << " not yet implemented.";
|
ss << ">> **ERROR** idf_version=" << fIdfVersion << " not yet implemented.";
|
||||||
fErrorMsg = ss.str();
|
fErrorMsg = ss.str();
|
||||||
status = NX_ERROR;
|
status = NX_ERROR;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user