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

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

[Octave-bug-tracker] [bug #45843] Feature Request: Special handling for


From: Rik
Subject: [Octave-bug-tracker] [bug #45843] Feature Request: Special handling for max_recursion_depth error stack
Date: Sat, 29 Aug 2015 14:14:49 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)

URL:
  <http://savannah.gnu.org/bugs/?45843>

                 Summary: Feature Request: Special handling for
max_recursion_depth error stack
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Sat 29 Aug 2015 07:14:48 AM PDT
                Category: Interpreter
                Severity: 2 - Minor
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

When max recursion depth is exceeded, Octave prints an error stack that is as
long as the recursion depth all citing the same line number.  It is a small
point, but it would be nicer if Octave would tell you just once that the
recursion depth had been exceeded.

I've attached a script, tstrecurse.m, which shows the issue.  The script body
is


## Set something far less than the default 256
max_recursion_depth (15);

## Subfunction to endlessly recurse
function recurse ()
   recurse ();
endfunction

## Invoke subfunction which will endlessly recurse
recurse ();


And the output is


octave:4> tstrecurse
error: max_recursion_depth exceeded
error: called from
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    recurse at line 14 column 4
    tstrecurse at line 18 column 1


It would be nicer if duplicate error messages could be collapsed into a single
message so the output was


error: max_recursion_depth exceeded
error: called from
    recurse at line 14 column 4
    tstrecurse at line 18 column 1


It's more of an issue when max_recursion_depth is set at its default of 256. 
On the other hand, this doesn't happen very offen so I've made the severity of
the report Minor.





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 29 Aug 2015 07:14:48 AM PDT  Name: tstrecurse.m  Size: 591B   By:
rik5

<http://savannah.gnu.org/bugs/download.php?file_id=34766>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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