#include <SALOMEDS_Tool.hxx>
#include <SALOMEDS_wrap.hxx>
-#include <Standard_ErrorHandler.hxx>
-#include <Standard_Failure.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
+#include "SMESH_TryCatch.hxx"
+
#include CORBA_SERVER_HEADER(SALOME_Session)
-#define MYDEBUGOUT(msg) //std::cout << msg << std::endl;
-//================================================================================
-#define PreMeshInfo_TRY \
- try { OCC_CATCH_SIGNALS
-//================================================================================
-#define PreMeshInfo_CATCH } \
- catch (Standard_Failure& ex) { \
- onExceptionCaught(SMESH_Comment("OCC Exception caught: \t")<<ex.GetMessageString()); \
- } \
- catch ( const std::exception& ex) { \
- onExceptionCaught(SMESH_Comment("Exception caught: \t")<<ex.what()); \
- } \
- catch (...) { \
- onExceptionCaught("Unknown Exception caught"); \
- }
-//================================================================================
+#define MYDEBUGOUT(msg) //std::cout << msg << std::endl;
namespace
{
}
}
- //================================================================================
- /*!
- * \brief Method useful only to set a breakpoint to debug in case of exception
- */
- //================================================================================
-
- void onExceptionCaught(const string& msg)
- {
- INFOS( msg );
- MYDEBUGOUT( msg );
- }
-
//=============================================================================
/*!
* \brief Class sending signals on start and finish of loading
const std::string& hdfFile,
const bool toRemoveFiles)
{
- PreMeshInfo_TRY;
+ SMESH_TRY;
SMESH_PreMeshInfo* meshPreInfo = new SMESH_PreMeshInfo( mesh,meshID,medFile,hdfFile );
mesh->changePreMeshInfo() = meshPreInfo;
{
meshPreInfo->FullLoadFromFile();
}
- PreMeshInfo_CATCH;
+ SMESH_CATCH( SMESH::doNothing );
}
//================================================================================
HDFgroup* infoHdfGroup = new HDFgroup( hdfGroupName, hdfFile );
infoHdfGroup->CreateOnDisk();
- PreMeshInfo_TRY;
+ SMESH_TRY;
// info of mesh
meshInfo2hdf( mesh->GetMeshInfo(), "Mesh", infoHdfGroup );
}
}
- PreMeshInfo_CATCH;
+ SMESH_CATCH( SMESH::doNothing );
infoHdfGroup->CloseOnDisk();
}
::SMESH_Mesh& mesh = _mesh->GetImpl();
SMESHDS_Mesh* meshDS = mesh.GetMeshDS();
- PreMeshInfo_TRY;
+ SMESH_TRY;
MYDEBUGOUT( "BEG FullLoadFromFile() " << _meshID );
// load sub-meshes
readSubMeshes( &myReader );
- PreMeshInfo_CATCH;
+ SMESH_CATCH( SMESH::doNothing );
_mesh->changePreMeshInfo() = meshInfo;
void SMESH_PreMeshInfo::ForgetAllData() const
{
- PreMeshInfo_TRY;
+ SMESH_TRY;
if ( _mesh->changePreMeshInfo() != this )
return _mesh->changePreMeshInfo()->ForgetAllData();
_mesh->changePreMeshInfo() = NULL;
delete this;
- PreMeshInfo_CATCH;
+ SMESH_CATCH( SMESH::doNothing );
// Finalize loading
- // PreMeshInfo_TRY;
+ // SMESH_TRY;
// ::SMESH_Mesh& mesh = _mesh->GetImpl();
// // hyp->UpdateAsMeshesRestored();
- // PreMeshInfo_CATCH;
+ // SMESH_CATCH( SMESH::doNothing );
}
//================================================================================