SiteMap
 Documentation

Error handling

The ELXHANDLER process has been around for a very long time. It's quite ingenious. It's main purpose is to easily "control" errors, not to track and report them.

Davin

From: APL Solutions Inc. (Eric Landau) [mailto:aplsi@starpower.net] Sent: Tuesday, April 01, 2003 5:09 PM To: Carl House Subject: Re: rts error message

At 11:34 AM 4/1/03, you wrote:

©’{*:ŒERROR (¯1+ŒDM¼ŒTCNL)↑ŒDM} This is the ELXHANDLER function which is used by SoftMed in all its WSs. That function provides a more powerful and flexible way of dealing with errors than attempting to use []ELX raw. To use it, you set []ELX in your WS to '{execute}ELXHANDLER' (and put ELXHANDLER in the WS). That lets you embed "error handlers" in your functions as code (in comments) on the line where you want to handle the error (among other things). The error handlers are comments that start with '{del}{' (or {del~}{'). If []ELX is not '{execute}ELXHANDLER' they are no-ops.

The fragment of code from ITie actually delivers a *less* informative error message than without the handler -- the "erroring" line of code will show in the session as the line of the calling function where ITie was called, rather than the line of ITie that has the error handler.

It's not that hard to learn to use it. Both ELXHANDLER and some sketchy documentation (in variable HANDLERShow) can be found in the HANDLERS WS in the TOOLS directory that comes with the APL interpreter. There's probably better doc somewhere, but I don't know where it might be found. /Eric Landau.

horizontal line
to home page e-mail