I'm replicating a question I asked on Octave mailing list.
How do I catch any error that Octave returns when using Octave in C++ code? I would like to catch any Octave core/package errors. Which API functions would I use to catch and print the error?
You need to wrap the code that may contain the potential error in a try catch statement
https://www.gnu.org/software/octave/doc/interpreter/The-try-Statement.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.