Skip to content

Commit

Permalink
Merge pull request #65 from rdeits/rd-fix-error-ids
Browse files Browse the repository at this point in the history
fix duplicate colon matlab error identifiers
  • Loading branch information
jaeandersson committed Jan 5, 2016
2 parents de0c52d + 388538c commit 34f58d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Lib/matlab/matlabtypemaps.swg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define SWIG_SetConstant(name, obj) SWIG_Matlab_SetConstant(module_ns,name,obj)

// raise
#define SWIG_Matlab_Raise(OBJ, TYPE, DESC) mexErrMsgIdAndTxt("SWIG::RuntimeError", "C++ side threw an exception of type " TYPE)
#define SWIG_Matlab_Raise(OBJ, TYPE, DESC) mexErrMsgIdAndTxt("SWIG:RuntimeError", "C++ side threw an exception of type " TYPE)
#define SWIG_Raise(obj, type, desc) SWIG_Matlab_Raise(obj, type, desc)

/* directors are supported in Matlab */
Expand Down
4 changes: 2 additions & 2 deletions Source/Modules/matlab.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,10 @@ int MATLAB::top(Node *n) {
Iterator i = First(l_modules);
if (i.item) {
Printf(f_init, "mxArray *id = mxCreateDoubleScalar(double(4)), *error;\n");
Printf(f_init, "if (!id) mexErrMsgIdAndTxt(\"SWIG::RuntimeError\", \"Setup failed\");\n");
Printf(f_init, "if (!id) mexErrMsgIdAndTxt(\"SWIG:RuntimeError\", \"Setup failed\");\n");
for (; i.item; i = Next(i)) {
Printf(f_init, "error = mexCallMATLABWithTrap(0, 0, 1, &id, \"%s\");\n", i.item);
Printf(f_init, "if (error) mexErrMsgIdAndTxt(\"SWIG::RuntimeError\", \"Cannot initialize %s\");\n", i.item);
Printf(f_init, "if (error) mexErrMsgIdAndTxt(\"SWIG:RuntimeError\", \"Cannot initialize %s\");\n", i.item);
Delete(i.item);
}
Printf(f_init, "mxDestroyArray(id);\n");
Expand Down

0 comments on commit 34f58d4

Please sign in to comment.