Salome HOME
Fix for IPAL9408 : 3.0.0(current3106): CRASH after trying to "Close" saved document...
[modules/kernel.git] / src / Batch_SWIG / libBatch_Swig_exception.i
1 /*
2  * _exception.i : 
3  *
4  * Auteur : Ivan DUTKA-MALEN - EDF R&D
5  * Date   : Septembre 2003
6  * Projet : SALOME 2
7  *
8  */
9
10 %exception {
11     try {
12       $action
13     }
14     catch (Batch::GenericException & ex) {
15       std::string msg = ex.type + " : " + ex.message;
16       PyErr_SetString(PyExc_RuntimeWarning, msg.c_str());
17       return NULL;
18     }
19     catch (...) {
20       PyErr_SetString(PyExc_RuntimeWarning, "unknown exception");
21       return NULL;
22     }
23 }
24