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

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

[Octave-bug-tracker] [bug #29447] Cannot create @handles to non-existing


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #29447] Cannot create @handles to non-existing functions
Date: Tue, 06 Apr 2010 16:52:29 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100308 Iceweasel/3.5.8 (like Firefox/3.5.8)

Follow-up Comment #4, bug #29447 (project octave):

It seems to me that returning a string with the name of the function in this
case is not the right thing to do, because at the point where the handle is
used (in your feval call) there could be a function with that name that is
visible that was not visible when the function handle was created.  So it
seems it would be better to create an anonymous function like

  msg = sprintf ("no function or method `%s' in this context",
                 function_name);
  retval = @() error (msg);

or similar.  Of course, this needs to be done in C++.

Is there any reason that we can't do what I'm proposing above instead of just
throwing the error immediately when the function handle is created?

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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