Menu

#196 Raised exception hidden by following code

GC 3.0
closed
exceptions (9)
6
2017-12-20
2016-01-26
Edward Hart
No

Consider the following:

:::cobolfree
DISPLAY "blah" AT COL 100000000000000
ACCEPT OMITTED

The DISPLAY statement will cause EC-SCREEN-STARTING-COLUMN to exist and will cause FUNCTION EXCEPTION-STATUS to return that exception condition. However, the ACCEPT resets the last exception, causing FUNCTION EXCEPTION-STATUS to return a blank string afterwards. I believe similar behaviour occurs after calling some intrinsic functions.

This should not happen as EXCEPTION-STATUS returns the name of the last exception raised, not one that happened to be raised by the previous statement. The last exception status may only be blanked by an explicit SET LAST EXCEPTION TO OFF statement.

Discussion

  • Simon Sobisch

    Simon Sobisch - 2016-01-26

    Very good point! Any chance for you to look at this?

     
    • Edward Hart

      Edward Hart - 2016-01-26

      Yes, but not immediately. I'll do some of the stuff from [feature-requests:#103] first. You're welcome to work on this, if you want.

       

      Related

      Wish List: #103

  • Simon Sobisch

    Simon Sobisch - 2016-01-26

    You're welcome to work on this, if you want.

    Although it looks like a quick victory (don't set the exception to zero despite on runtime init and SET LAST EXCEPTION TO OFF) I'll stick to all the other points already on my agenda.
    But who knows what happens next...

    Whoever starts to investigate for necesary changes leaves a note here and we're fine.

     
  • Edward Hart

    Edward Hart - 2016-03-29

    I've added SET LAST EXCEPTION TO OFF in [r831].

     
  • Simon Sobisch

    Simon Sobisch - 2017-12-20
    • status: accepted --> closed
    • assigned_to: Simon Sobisch
    • Group: GC 2.2 --> GC 3.0
     
  • Simon Sobisch

    Simon Sobisch - 2017-12-20

    Fixed by [r2303].

     

Log in to post a comment.

MongoDB Logo MongoDB