[Better late than never]
13!:8 itself creates an error. Here, everything was going along
great: +y failed, but the error was caught, and it was all going to be
OK until we crashed on 13!:8. So as far as the JE is concerned, the
13!:8 line IS where the error is. A try. in an earlier verb might trap it.
A reasonable change would be this: if error-text is given for 13!:8,
that text becomes the entire error-massage, and 13!:8 will not add the
13!:8 line too.
That would leave you responsible for seeing what line failed, which
you can do with 13!:12'' before executing 13!:8. 13!:8 isn't going to
be able to point to the failing line.
Comments, please.
Henry Rich
On 5/18/2016 12:10 PM, Don Guinn wrote:
It has always bugged me that debug signal message is not correct. Now that
the J source is open for suggestions for changes I would like to suggest a
change to the message.
Given:
f
+-+-+------------------------------------+
|3|:|try. +y |
| | |catch. 'y is not numeric.'(13!:8)123|
| | |end. |
+-+-+------------------------------------+
'First', f 'Last'
|y is not numeric.
| 'y is not numeric.' (13!:8)123
'First', + 'Last'
|domain error
| 'First', +'Last'
Notice that the second error message shows the caller's line in error, not
the line issuing the message. It would be more meaningful if the display
were:
'First', + 'Last'
|y is not numeric.
| 'First', f'Last'
Granted, if debug were on then the suspension and message should be as it
is now, but when it is off using the line from the caller makes more sense.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm