22017: [CEA 739] Get an error code returned by cadsurf_set_param

Remove "Salome " from "Salome Exception" prefix returned by
  SALOME_Exception::what() while composing an error message
This commit is contained in:
eap 2012-12-18 13:33:32 +00:00
parent 338eab651c
commit 9ed5632be0
2 changed files with 5 additions and 2 deletions

View File

@ -1474,9 +1474,12 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
}
}
catch ( SALOME_Exception& S_ex ) {
const int skipSalomeShift = 7; /* to skip "Salome " of
"Salome Exception" prefix returned
by SALOME_Exception::what() */
if ( !_computeError ) _computeError = SMESH_ComputeError::New();
_computeError->myName = COMPERR_SLM_EXCEPTION;
_computeError->myComment = S_ex.what();
_computeError->myComment = S_ex.what() + skipSalomeShift;
}
catch ( std::exception& exc ) {
if ( !_computeError ) _computeError = SMESH_ComputeError::New();

View File

@ -1196,7 +1196,7 @@ class Mesh:
"Invalid input mesh", #COMPERR_BAD_INPUT_MESH
"std::exception", #COMPERR_STD_EXCEPTION
"OCC exception", #COMPERR_OCC_EXCEPTION
"SALOME exception", #COMPERR_SLM_EXCEPTION
"..", #COMPERR_SLM_EXCEPTION
"Unknown exception", #COMPERR_EXCEPTION
"Memory allocation problem", #COMPERR_MEMORY_PB
"Algorithm failed", #COMPERR_ALGO_FAILED