]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
22017: [CEA 739] Get an error code returned by cadsurf_set_param
authoreap <eap@opencascade.com>
Tue, 18 Dec 2012 13:33:32 +0000 (13:33 +0000)
committereap <eap@opencascade.com>
Tue, 18 Dec 2012 13:33:32 +0000 (13:33 +0000)
  Remove "Salome " from "Salome Exception" prefix returned by
  SALOME_Exception::what() while composing an error message

src/SMESH/SMESH_subMesh.cxx
src/SMESH_SWIG/smeshDC.py

index 42be92b04501682d8619b29739430134664c4b11..27092ce8f1db38c6820a79628402e6776dbaa3e2 100644 (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();
index 99bed42fbd04e2ec913e2dfb962f495c794bad04..4f0040c70727752f43a8f971d0a0fde7c89107a5 100644 (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