From 9ed5632be0558a08ec3579940df085bfe5a70bee Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 18 Dec 2012 13:33:32 +0000 Subject: [PATCH] 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 --- src/SMESH/SMESH_subMesh.cxx | 5 ++++- src/SMESH_SWIG/smeshDC.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 42be92b04..27092ce8f 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -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(); diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 99bed42fb..4f0040c70 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -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 -- 2.39.2