[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59592] using std::exception to catch errors
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #59592] using std::exception to catch errors |
Date: |
Wed, 2 Dec 2020 16:11:11 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 |
Update of bug #59592 (project octave):
Status: None => Need Info
_______________________________________________________
Follow-up Comment #2:
I can see that this would be easy to resolve. It may have even been an
oversight not to "public"ly inherit from std::runtime_error. I've CC'ed jwe
who did the work on this to review that question.
But, I do wonder how critical it is to fix this. When coding for Octave, such
as an octfile, a C++ programmer has access to all the functions and data types
that Octave itself has. Since this is a try block for Octave code, why not
catch an Octave exception rather than catching the generic C++ exception? For
example, the following works:
catch (const octave::execution_exception& e)
Is there some benefit that I'm not seeing for catching the more general parent
class of std::exception?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59592>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59592] using std::exception to catch errors, anonymous, 2020/12/02
- [Octave-bug-tracker] [bug #59592] using std::exception to catch errors, anonymous, 2020/12/02
- [Octave-bug-tracker] [bug #59592] using std::exception to catch errors,
Rik <=
- [Octave-bug-tracker] [bug #59592] using std::exception to catch errors, John W. Eaton, 2020/12/02
- [Octave-bug-tracker] [bug #59592] using std::exception to catch errors, Rik, 2020/12/02
- [Octave-bug-tracker] [bug #59592] using std::exception to catch errors, John W. Eaton, 2020/12/02
- [Octave-bug-tracker] [bug #59592] using std::exception to catch errors, Rik, 2020/12/02
- [Octave-bug-tracker] [bug #59592] using std::exception to catch errors, anonymous, 2020/12/02