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

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

[Octave-bug-tracker] [bug #60466] Wish: errors in built-in functions sho


From: Rik
Subject: [Octave-bug-tracker] [bug #60466] Wish: errors in built-in functions should provide debugging information pointing to m-file context
Date: Thu, 29 Apr 2021 10:59:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36

Update of bug #60466 (project octave):

                Severity:              3 - Normal => 1 - Wish               
              Item Group:                    None => Feature Request        
                  Status:               Need Info => Confirmed              
                 Release:                   6.2.0 => dev                    
        Operating System:       Microsoft Windows => Any                    
                 Summary: printf error message without debugging context.
Octave quits debugging with insufficient context display => Wish: errors in
built-in functions should provide debugging information pointing to m-file
context

    _______________________________________________________

Follow-up Comment #3:

I see what you mean.  This is a larger issue so I have re-titled the bug
report and made it a feature request.

In Octave functions may be implemented either in m-files or in compiled files
written in languages like C++.  The latter functions are referred to as
built-in functions in Octave.

When an error occurs in an m-file, the interpreter reports the location of the
error along with the function stack.  However, when an error occurs in a
built-in function only the error message is printed without any additional
information.  Changing this will be quite a project so I have changed the
Release field to "dev" because this work will have to occur on the development
branch.

For testing, I used this function


function tst_error
  error ('my error');
  [a,b,c] = ls ();
  tt = sprintf ("format string %s", { } ) ;
endfunction


The function is attached to this bug report as well.  When an error is
explicitly thrown--using the error() function--the result is


error: my error
error: called from
    tst_error at line 2 column 3


If I comment out the first line of the function and re-execute I get


error: ls: function called with too many outputs
error: called from
    ls
    tst_error at line 3 column 11
 

Finally, if I comment out the ls() function call I get just


error: sprintf: wrong type argument 'cell'



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60466>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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