X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOMEDS%2FSALOMEDS_BasicAttributeFactory.cxx;h=6669582475aa0e4daf134d6d7b47a99be56fd755;hb=ccbcbecbbd2f874cc142bbe491a1d3474135b218;hp=bd83af147d6b99f0b659e487c85428da0e4d2e0b;hpb=102608ce8b69dd1ea798169e30223b67742ec26d;p=modules%2Fyacs.git diff --git a/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx b/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx index bd83af147..666958247 100644 --- a/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx +++ b/src/SALOMEDS/SALOMEDS_BasicAttributeFactory.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_BasicAttributeFactory.hxx" #include "utilities.h" +using namespace std; //============================================================================ /*! Function : Create @@ -38,16 +38,17 @@ using namespace std; SALOMEDS_BasicAttribute_i* BasicAttributeFactory::Create(const char* type) throw (SALOME_Exception) { - if (!strcmp(type,"AttReal")) - { - SALOMEDS_AttReal_i *A = new SALOMEDS_AttReal_i(); - return A; - } - else if(!strcmp(type,"AttLong")) - { - SALOMEDS_AttLong_i *A = new SALOMEDS_AttLong_i(); - return A; - } - else throw(SALOME_Exception(LOCALIZED("bad attribute type name"))); - + try { + if (!strcmp(type,"AttReal")) + { + SALOMEDS_AttReal_i *A = new SALOMEDS_AttReal_i(); + return A; + } + else if(!strcmp(type,"AttLong")) + { + SALOMEDS_AttLong_i *A = new SALOMEDS_AttLong_i(); + return A; + } + else throw(SALOME_Exception(LOCALIZED("bad attribute type name"))); + } catch (...) {throw(SALOME_Exception(LOCALIZED("Unexpected exception was caught")));} }