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

 
 

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

Submitted by:  Olaf Till <i7tiol>
Submitted on:  Mon 19 Oct 2015 06:27:53 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Olaf TillOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project 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>
Project 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>
Project 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>
Project 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>
Project 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>
Project 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:

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>
Project Member

 

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

Attach File(s):
   
   
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
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by i7tiol (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 20 Oct 2015 03:17:54 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 20 Oct 2015 11:06:32 AM UTCi7tiolAttached File-=>Added avoid-throw.diff, #35241
    Mon 19 Oct 2015 11:44:47 PM UTCjweAttached File-=>Added diffs.txt, #35235

    Back to the top


    Powered by Savane 3.1-cleanup1