#include "VISU_Convertor.hxx"
#include "VISU_ConvertorUtils.hxx"
+#include "MULTIPR_Obj.hxx"
#include "MULTIPR_API.hxx"
+#include "MULTIPR_Exceptions.hxx"
#include "SALOMEDS_Tool.hxx"
#include "HDFascii.hxx"
INITMSG(MYDEBUG, "'"<<aFileName<<"'\n");
}
}
- int aRes = multipr::merge(aFileNames, theMeshName.c_str(), theFieldName.c_str(), aFileName.c_str());
+ int aRes = false;
+ std::string anErrorMessage("empty mesh");
+ try {
+ INITMSG(MYDEBUG, "theMeshName = '"<<aFileName<<"'; theFieldName = '"<<theFieldName<<"'\n");
+ aRes = multipr::merge(aFileNames, theMeshName.c_str(), theFieldName.c_str(), aFileName.c_str());
+ }catch(std::exception& exc){
+ MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+ anErrorMessage = exc.what();
+ }catch(multipr::RuntimeException& exc){
+ std::ostringstream aStream;
+ exc.dump(aStream);
+ aStream<<ends;
+ MSG(MYDEBUG,"Follow exception was occured in:\n"<<aStream.str());
+ anErrorMessage = aStream.str();
+ }catch(...){
+ MSG(MYDEBUG,"Unknown exception !!!");
+ }
INITMSGA(MYDEBUG, 0, "aRes = "<<aRes<<"\n");
if (aRes == 0) {
- QFile(aFileName.c_str()).remove();
- throw std::runtime_error("empty mesh");
+ VISU::RemoveFile(aFileName);
+ throw std::runtime_error(anErrorMessage);
}
PInput anInput(CreateConvertor(aFileName));
anInput->BuildFields();
+ anInput->BuildMinMax();
myRepresentation2Input[aRepresentationKey] = anInput;
return anInput;
}