[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48439] validateattributes throws errors witho
[Octave-bug-tracker] [bug #48439] validateattributes throws errors without IDs
Sat, 1 Oct 2016 15:37:28 +0000 (UTC)
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Update of bug #48439 (project octave):
Item Group: Matlab Compatibility => None
Follow-up Comment #23:
I think the issue of this discussion is that we are looking at the error
ids from the point of view of different users. Who will be the user of
the error ids? Given a function foo() that uses validateattributes for
input check, who will be using the error ids? The developer of foo() or
the caller of foo()?
For the caller of foo(), the new error ids will not be useful. The caller
of foo() will not even know which of the arguments failed validation and
so there's no point on knowing why that unknown argument failed validation.
In addition, with the new error ids, the caller of foo() will not even be
to know if foo() failed because of invalid arguments (having the caller of
foo() list all possible 28 error ids related to invalid argument is not
So the only user of the new error ids is the developer of foo().
But why should the developer of foo() care about them? The only reason
to catch an exception is if there's some exception handling to do.
What exception handling is there to do for an invalid argument that
is dependent on knowing why the argument is invalid? The only case
where I see that being used is if the argument is not really invalid
and exceptions are being used for flow control.
This questions are not rhetorical. Can someone please explain the design
of this choice and why this change?
Also, I'm removing the Matlab compatibility tag since we are not Matlab
compatible on error ids and there are no plans to be so.
Reply to this item at:
Message sent via/by Savannah
|[Prev in Thread]
||[Next in Thread]|
- [Octave-bug-tracker] [bug #48439] validateattributes throws errors without IDs,
Carnë Draug <=