Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!wuarchive!udel!new From: new@udel.edu (Darren New) Newsgroups: comp.lang.rexx Subject: Re: AREXX error trapping question Message-ID: <9941@nigel.udel.EDU> Date: 2 Feb 90 18:45:23 GMT References: <10020@spudge.UUCP> Sender: usenet@udel.EDU Reply-To: new@udel.edu (Darren New) Organization: University of Delaware Lines: 29 In article <10020@spudge.UUCP> johnm@spudge.UUCP (John Munsch) writes: >I have an AREXX script where I call a function that sometimes returns an error >value. So, I put in: >signal on error >error: > > return >to handle this error value. Great so far. But when I attempt to "return" >from the error handler it treats the "return" as an exit. I think that the signal instruction is more a goto than a call. To solve this, you can do the following. Say your real function is called XYZZY and if it returns an error you want 'PLOVER' returned from the call. Recode all the calls to XYZZY to be calls to XYZZY$ and do the following: blah = XYZZY$(foo) ... ... ... blah2 = XYZZY$(foo2) ... ... ... XYZZY$: procedure parse arg y2 signal on error retval = XYZZY(y2) signal off error return retval error: return 'PLOVER' This, I should thing, will do the trick. Messy but effective. -- Darren