Changeset 13363
- Timestamp:
- 09/13/12 13:46:14 (13 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/python/include/python_macros.h
r12365 r13363 20 20 /*The following macros hide the error exception handling in a matlab module. Just put 21 21 * MODULEBOOT(); and MODULEEND(); at the beginning and end of a module, and c++ exceptions 22 * will be trapped. Really nifty!*/ 22 * will be trapped*/ 23 #define MODULEBOOT(); \ 24 PyObject *output = PyTuple_New(NLHS); \ 25 int nrhs = (int)PyTuple_Size(args); \ 26 if(!output) return NULL;\ 27 try{ \ 23 28 24 #define MODULEBOOT(); ModuleBoot(); \ 25 PyObject* output = PyTuple_New(NLHS); if (!output) return NULL;\ 26 int nrhs = (int)PyTuple_Size(args); 27 28 #define MODULEEND(); ModuleEnd(); \ 29 return output; 29 #define MODULEEND(); }\ 30 catch(ErrorException &exception){\ 31 PyErr_SetString(PyExc_TypeError,"ISSM Error"); \ 32 } \ 33 catch (exception &e){\ 34 PyErr_SetString(PyExc_TypeError,exprintf("Standard exception: %s\n",e.what()));\ 35 }\ 36 catch(...){\ 37 PyErr_SetString(PyExc_TypeError,"An unexpected error occurred");\ 38 }\ 39 return output; 30 40 //}}} 31 41 #if _PYTHON_MAJOR_ >=3 -
issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp
r12520 r13363 39 39 } 40 40 41 void ErrorException::Report() {41 void ErrorException::Report() const{ 42 42 extern int my_rank; 43 43 extern int num_procs; -
issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h
r12479 r13363 27 27 ~ErrorException() throw(); 28 28 virtual const char *what() const throw(); 29 void Report() ;29 void Report() const; 30 30 31 31 }; -
issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
r13248 r13363 255 255 int el1,el2; 256 256 257 double * segments=NULL;258 double * segmentmarkerlist=NULL;257 double *segments = NULL; 258 double *segmentmarkerlist = NULL; 259 259 int nsegs; 260 260 261 261 /*Recover input: */ 262 segments =*psegments;263 segmentmarkerlist =*psegmentmarkerlist;264 nsegs =*pnsegs;262 segments = *psegments; 263 segmentmarkerlist = *psegmentmarkerlist; 264 nsegs = *pnsegs; 265 265 266 266 /*Reallocate segments: */
Note:
See TracChangeset
for help on using the changeset viewer.