exception.cpp 718 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * file: exception.cpp
  3. * author: Hilton Bristow
  4. * date: Wed, 19 Jun 2013 11:15:15
  5. *
  6. * See LICENCE for full modification and redistribution details.
  7. * Copyright 2013 The OpenCV Foundation
  8. */
  9. #include "mex.h"
  10. /*
  11. * exception
  12. * Gateway routine
  13. * nlhs - number of return arguments
  14. * plhs - pointers to return arguments
  15. * nrhs - number of input arguments
  16. * prhs - pointers to input arguments
  17. */
  18. void mexFunction(int nlhs, mxArray* plhs[],
  19. int nrhs, const mxArray* prhs[]) {
  20. // call the opencv function
  21. // [out =] namespace.fun(src1, ..., srcn, dst1, ..., dstn, opt1, ..., optn);
  22. try {
  23. throw 1;
  24. } catch(...) {
  25. mexErrMsgTxt("Uncaught exception occurred!");
  26. }
  27. }