Right now errors messages in the wrappers raise warnings instead of errors in MATLAB followed by a generic error message at the end. It should be possible to avoid these warning messages by instead constructing an MException array with all the error information and return this to the mexFunction gateway.
This means function signature of the structure of the wrapper functions from:
int _wrap_foo(int resc, mxArray *resv[], int argc, mxArray *argv[]) {
...
}
Right now errors messages in the wrappers raise warnings instead of errors in MATLAB followed by a generic error message at the end. It should be possible to avoid these warning messages by instead constructing an MException array with all the error information and return this to the mexFunction gateway.
This means function signature of the structure of the wrapper functions from:
to
On success, it would return 0 (cf. mexCallMATLABWithTrap).