hercules-390 / hyperion

Hercules 390
Other
248 stars 67 forks source link

redtest.rexx would benefit from including line number and traceback when :novalue is raised. #201

Open srorso opened 7 years ago

srorso commented 7 years ago

redtest.rexx currently issues the following messages when the novalue condition is raised (Windows example shown):

Novalue in C:\common\github\hyperion\tests\redtest.rexx   -- variable DISPLAY
   344 >>> wantres = rest = display
  This is often caused by missing or misspelled *Testcase
  Note that the verbs are case sensitive.  E.g., *testcase is not correct.
   569 *-* signal value lets_get_a_traceback
   214 *-*                           call want
   145 *-*                   call order
    55 *-*       call procline l
Error 16 running C:\common\github\hyperion\tests\redtest.rexx line 569:  Label not found
Error 16.1:  Label "LETS_GET_A_TRACEBACK" not found

It would be helpful if redtest.rexx included the line number currently being processed in alltests.out when the novalue condition is detected, and if it explained that the technique used to get the traceback, by generating an invalid signal, is not another error. Hercules users who do not use REXX will not recognize the technique.

jphartmann commented 7 years ago

The alltests.out file is the Hercules log file. I cannot add to that in a post processor.

The signal value construct is actually to defeat the REXX compiler in flagging a signal to an undefined label.

srorso commented 7 years ago

Hi John:

Sorry, I was not clear about the proposed change.

I was thinking of just adding code to generate a line saying "While processing line 122038 of allTests.out" following the line generating the signal and before the line starting "This is often...". A line counter in redtest.rexx and a say should do it. I certainly have no wish to change the Hercules log to support this.

You are right about defeating REXX; I wasn't aware or had forgotten the technique and the "Error 16" messages looked like a secondary error. A message to that effect might have helped me, but it is a nit and may not be worth it.

Best Regards, Steve Orso

jphartmann commented 7 years ago

Oh, you mean the line number in the input file. I thought you wanted the line number in the REXX program.

Absolutely.