Improved exception handling and unit tests

This commit is contained in:
hbristow
2013-06-19 16:37:57 +10:00
parent bbece095fb
commit 0c726a3fbe
4 changed files with 46 additions and 2 deletions

View File

@@ -27,6 +27,16 @@ std::vector<Bridge> {{function.name}}({{clss.name}}& inst, const std::vector<Bri
// setup
// invoke
try {
// invoke
} catch(cv::Exception& e) {
mexErrMsgTxt(std::string("cv::exception caught: ").append(e.what()).c_str());
} catch(std::exception& e) {
mexErrMsgTxt(std::string("std::exception caught: ").append(e.what()).c_str());
} catch(...) {
mexErrMsgTxt("Uncaught exception occurred in {{fun.name}}");
}
// setdown
}