bugGNU Octave - Bugs: bug #46251, error doesn't return to debug...

 
 

bug #46251: error doesn't return to debug prompt

Submitter:  Olaf Till <i7tiol>
Submitted:  Mon 19 Oct 2015 06:27:53 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Olaf Till Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 20 Oct 2015 03:17:54 PM UTC, comment #6: 

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/31219c56874f

John W. Eaton <jwe>
Group administrator
Tue 20 Oct 2015 12:33:55 PM UTC, comment #5: 

And for the case you had not the time to test it yet, your patch compiles and fixes the issue for me.

Olaf Till <i7tiol>
Group Member
Tue 20 Oct 2015 11:55:46 AM UTC, comment #4: 


> But why not just avoid the exception instead, as in
> the attached patch (untested)?


Oh, please forget this ... my patching seems to have been faster than my thinking. Of course you need the exception first. So no different suggestions ...

Olaf Till <i7tiol>
Group Member
Tue 20 Oct 2015 11:06:32 AM UTC, comment #3: 


> though resetting the error handler might be best in the
> catch block, I don't know.


I'd say it's better where it is, not in the catch block, since you probably always want to reset, not only in case of an error.

But why not just avoid the exception instead, as in the attached patch (untested)?

(file #35241)

Olaf Till <i7tiol>
Group Member
Mon 19 Oct 2015 11:45:34 PM UTC, comment #2: 

That patch is simpler than it looks.  Most of it is just whitespace changes because of indenting the try-catch block.

John W. Eaton <jwe>
Group administrator
Mon 19 Oct 2015 11:44:47 PM UTC, comment #1: 

The fix should be something like the attached patch, though resetting the error handler might be best in the catch block, I don't know.


(file #35235)

John W. Eaton <jwe>
Group administrator
Mon 19 Oct 2015 06:27:53 PM UTC, original submission:  

If a command given at the debug prompt causes an error, it returns to top level, not to the debug prompt. Example:


octave:1> function func ()
> keyboard
> endfunction
octave:2> func
stopped in func at line 2
debug> error ("test")
error: test
error: called from
    func at line 2 column 1
octave:2>


Since this is probably connected to recent changes, basing error() on expressions, see also (noted by Rik):
<http://savannah.gnu.org/bugs/?46216>

Olaf Till <i7tiol>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #35241:  avoid-throw.diff added by i7tiol (288B - text/x-patch)
file #35235:  diffs.txt added by jwe (1KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by i7tiol (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-10-20 jwe StatusNone Fixed
        Open/ClosedOpen Closed
    2015-10-20 i7tiol Attached File- Added avoid-throw.diff, #35241
    2015-10-19 jwe Attached File- Added diffs.txt, #35235

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code