0

I am working on a legacy android codebase which uses OpenCV4Android using the NDK. A particular class of problems I have are of this form :

  1. The ndk c++ method calls an OpenCV function.
  2. The opencv function has a CV_Assert (a subclass of std::exception) which fails and throws an exception.
  3. The c++ method doesn't catch the exception - but the calling method of the c++ method which called the opencv function handles the exception by logging a message.

The problem is that I don't get information about the method which calls the opencv function. Putting this method in a try catch block is an option but there are a lot of calls like this and I am looking for an alternative.

Void foo() {
libfun() // this throws exception
..
libfun()
..
libfun()}

Void bar() {
Try{
 Foo()
 }
 Catch(Exception e)
 { Log}
tejaswi prakash
  • 104
  • 1
  • 6

0 Answers0