Changeset 19701
- Timestamp:
- 11/09/15 17:53:05 (9 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp
r17495 r19701 80 80 return; 81 81 }/*}}}*/ 82 const char* ErrorException:: MatlabReport() const{/*{{{*/82 const char* ErrorException::WrapperReport() const{/*{{{*/ 83 83 84 84 /*Output*/ … … 100 100 return message; 101 101 }/*}}}*/ 102 const char* ErrorException::PythonReport() const{/*{{{*/103 104 /*Output*/105 std::ostringstream buffer;106 char *message = NULL;107 108 /*WINDOWS*/109 if(!function_name || file_line==0){110 buffer << " error message: " << this->what_str;111 }112 else{113 buffer << "\nError in ==> " << this->file_name << ":" << file_line << "\n";114 buffer << this->function_name << " error message: " << this->what_str;115 }116 117 /*Convert std::ostringstream to std::string and then create char* */118 std::string buffer2 = buffer.str();119 message = xNew<char>(strlen(buffer2.c_str())+1); sprintf(message,"%s",buffer2.c_str());120 return message;121 }/*}}}*/ -
issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h
r17513 r19701 87 87 virtual const char *what() const throw(); 88 88 void Report() const; 89 const char* MatlabReport() const; 90 const char* PythonReport() const; 89 const char* WrapperReport() const; 91 90 92 91 }; -
issm/trunk-jpl/src/wrappers/matlab/include/wrapper_macros.h
r16230 r19701 23 23 #define MODULEEND(); }\ 24 24 catch(ErrorException &exception){\ 25 mexErrMsgTxt(exception. MatlabReport()); \25 mexErrMsgTxt(exception.WrapperReport()); \ 26 26 }\ 27 27 catch (exception &e){\ -
issm/trunk-jpl/src/wrappers/python/include/wrapper_macros.h
r19054 r19701 27 27 #define MODULEEND(); }\ 28 28 catch(ErrorException &exception){\ 29 PyErr_SetString(PyExc_TypeError,exception. PythonReport()); \29 PyErr_SetString(PyExc_TypeError,exception.WrapperReport()); \ 30 30 return NULL;\ 31 31 } \
Note:
See TracChangeset
for help on using the changeset viewer.