// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_BasicAttributeFactory.hxx"
#include "utilities.h"
+using namespace std;
//============================================================================
/*! Function : Create
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")));}
}