octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #48439] validateattributes throws errors witho


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #48439] validateattributes throws errors without IDs
Date: Sun, 14 Aug 2016 23:09:51 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #21, bug #48439 (project octave):

> This does NOT seem to address the issues raised in the discussion.
>

Can you be more specific about the issues it does not address?

* It adds an error id to the error message -- issue addressed.
* It allows to distinguish failed input check (error id "invalid-input-arg" as
already documented) from incorrect calling of validateattributes (error id
"Octave:validateattributes:invalid-input-arg") -- issue addressed.
* It only adds one new error id (which is unique to calling validateattributes
incorrectly) -- issue of not adding 34 new error ids addressed.

> You just removed the specific error ids expressing the different reasons for
failure.
>
> But you still introduced more new error IDs.
>
> So this does still increase the total number of error IDs in Octave, but to
really little use. 

I agree that the validateattributes unique error id is of little use.  I'm
only adding it as compromise since that was one of the issues.  I'll gladly
remove it and make it use the standard "Octave:invalid-input-arg" if you
prefer.

I will mention this one more time: too many error ids in Octave makes error
ids useless because Octave has no class system for errors.  No one will ever
want to catch only the "expected-less-equal" and treat it different from a
"expected-less-equal".  Even languages that do have a class system for errors
do not go into such detail. See python
https://docs.python.org/3/library/exceptions.html#exception-hierarchy (which
has only TypeError and ValueError) and C++
http://en.cppreference.com/w/cpp/error/exception (which only has
invalid_argument) for examples.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48439>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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