Salome HOME
NRI : Comment unused ComponentType enum.
[modules/kernel.git] / src / Utils / Utils_CorbaException.hxx
1 //=============================================================================
2 // File      : Utils_CorbaException.hxx
3 // Created   : mer déc 19 14:12:19 CET 2001
4 // Author    : Paul RASCLE, EDF
5 // Project   : SALOME
6 // Copyright : EDF 2001
7 // $Header$
8 //=============================================================================
9
10 #ifndef _UTILS_CORBAEXCEPTION_HXX_
11 #define _UTILS_CORBAEXCEPTION_HXX_
12
13 #include <SALOMEconfig.h>
14 #include CORBA_SERVER_HEADER(SALOME_Exception)
15
16 /*! 
17  * To raise a CORBA exception from a CORBA servant.
18  */
19 # define THROW_SALOME_CORBA_EXCEPTION(chain, typex) \
20               {\
21                 SALOME::ExceptionStruct ExDescription; \
22                 ExDescription.text = CORBA::string_dup(chain); \
23                 ExDescription.type = typex; \
24                 ExDescription.sourceFile = CORBA::string_dup(__FILE__); \
25                 ExDescription.lineNumber = __LINE__; \
26                 throw SALOME::SALOME_Exception(ExDescription); \
27               }
28
29 #endif