Improved exception handling in function template
This commit is contained in:
parent
804d0924c9
commit
4d135ac4d8
@ -37,7 +37,11 @@ void mexFunction(int nlhs, mxArray* plhs[],
|
|||||||
|
|
||||||
// call the opencv function
|
// call the opencv function
|
||||||
// [out =] namespace.fun(src1, ..., srcn, dst1, ..., dstn, opt1, ..., optn);
|
// [out =] namespace.fun(src1, ..., srcn, dst1, ..., dstn, opt1, ..., optn);
|
||||||
{{fun.name}}();
|
try {
|
||||||
|
{{fun.name}}();
|
||||||
|
} catch(...) {
|
||||||
|
mexErrMsgTxt("Uncaught exception occurred in {{fun.name}}");
|
||||||
|
}
|
||||||
{% block fcall %}
|
{% block fcall %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user