help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Capturing exception messages in octave C++ API


From: John W. Eaton
Subject: Re: Capturing exception messages in octave C++ API
Date: Wed, 16 Oct 2019 12:59:32 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 10/16/19 6:50 AM, rupakrokade wrote:
Hello,

I am using the octave C++ API to call octave from a C++ code. I am using
"feval" to call the octave functions. Whenever something incorrect is passed
to feval, it prints a nice detailed explanation of what went wrong, on the
terminal. I want to capture this detailed message so that it can be returned
to the main function that called it, rather than just printing to the
terminal. This is because the code could be invoked by a different software
and not necessarily from the terminal. How do I do it??

If you are using Octave development sources, error messages are now stored in the exception object. With earlier versions it is possible to buffer error messages and retrieve them later, but the interface is not very nice.

This change was made very recently. See this thread on the maintainers list: https://lists.gnu.org/archive/html/octave-maintainers/2019-10/msg00009.html

jwe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]