diff --git a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx index 3bcba5d4ab7..f8801afc781 100644 --- a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx +++ b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx @@ -903,6 +903,11 @@ HDF5ImageIO ::ReadImageInformation() { itkExceptionMacro(<< error.getCDetailMsg()); } + catch (...) + { + itkExceptionMacro(<< "Unspecified error occured during ReadImageInformation " << this->GetFileName() << " with " + << this->GetNameOfClass()); + } } void @@ -1246,6 +1251,11 @@ HDF5ImageIO ::WriteImageInformation() { itkExceptionMacro(<< error.getCDetailMsg()); } + catch (...) + { + itkExceptionMacro(<< "Unspecified error occured during WriteImageInformation: " << this->GetFileName() << " with " + << this->GetNameOfClass()); + } // // only write image information once. this->m_ImageInformationWritten = true; @@ -1301,6 +1311,11 @@ HDF5ImageIO ::Write(const void * buffer) { itkExceptionMacro(<< error.getCDetailMsg()); } + catch (...) + { + itkExceptionMacro(<< "Unspecified error occured during Write: " << this->GetFileName() << " with " + << this->GetNameOfClass()); + } } //