TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Ruud Senden
from: David Noon
date: 1996-01-07 12:10:04
subject: REXX errors

On Friday, 96/01/05, Ruud Senden wrote to David Noon about "REXX
errors" as follows:

RS> Well, the RC-variable is at least meaningfull with a syntax 
RS> error.

Hi Ruud,

What you are seeing here is REXX passing something it doesn't
understand to the command shell, CMD.EXE. If REXX can recognise it but
finds a syntax error, RC will not be valid.

Be aware of REXX's flexibility. The ugliest syntax is simply passed to
the default ADDRESS handler and is ignored by REXX. The ADDRESS handler
(CMD.EXE) expresses its displeasure by setting RC to some non-zero
value.

RS> The most difficult part is to figure out which error-
RS> messages are possible with the possible signals. For 
RS> example, when the user presses Ctrl-Break, a HALT-signal is 
RS> raised, and from that I have to know that I have to display 
RS> the errortext belonging to error 4.

These are documented somewhere (Red Books perhaps?), but coding the
REXX error message table into your program will make it rather bloated.

RS> Another difficult part is, that if you have nested procedure-calls
RS> (eg p1  calls p2, p2 calls p3, an error occurs somewhere in p3), 
RS> then the standard REXX-error also displays the names of p1,  p2 and
RS> p3, even with the right indentation.

Tracing back through the call tree is not very easy. It might even be
impossible from within REXX. This will limit your ability to format
messages.

Such a trace back is heavily dependent on the calling conventions used
by a particular language's run-time library. It is not usually possible
for routines other than the run-time support to determine the call
history during some exception handling.

RS> This is why I hoped there was a standard way to generate 
RS> the standard REXX-error, instead of having to figure out 
RS> all the possible error-messages with each possible signal, 
RS> and then having to build-up the error-message yourself.

Once you use SIGNAL ON ???? you become responsible for all the
handling of that particular condition. You will have most of the
pieces, but your program will have to put them together.

Perhaps the simplest approach would be to let the error be dealt with
by the REXX run-time support, complete with message formatting.

RS> Anyway, thank you for your answer, it confirmed my fear.

You are entirely welcome.

Regards

Dave


 * KWQ/2 1.2i * Accordions don't play Lady of Spain - people do! Just say no.

--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 808 809 934 955 712/407 515
SEEN-BY: 712/517 628 713/888 800/1 7877/2809
@PATH: 440/4 141/209 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.