[Coco] error trapping

Bob Devries devries.bob at gmail.com
Tue Dec 1 15:57:47 EST 2009


Wayne,

my suggestion on this would be to redirect the error output (if that's 
possible from withing Basic09) to a file. Upon returning from the shell, 
your programme should check the length of that file, and if it's zero, no 
error occurred. You could parse the file to see what the error condition was 
if necessary.

My A$0.02

Regards, Bob Devries

--
Besides a mathematical inclination, an exceptionally good mastery of one's 
native tongue is the most vital asset of a competent programmer.

Edsger W.Dijkstra, 18 June 1975

----- Original Message ----- 
From: "Wayne Campbell" <asa.rand at yahoo.com>
To: <coco at maltedmedia.com>
Sent: Tuesday, December 01, 2009 8:58 PM
Subject: [Coco] error trapping


>I need to know how to trap an error generated by the makdir command when 
>it's being executed with a SHELL statement in a Basic09 subroutine. If I 
>try to use it, and the directory already exists, the error is displayed on 
>the screen, despite the fact that I am using a ON ERROR GOTO statement to 
>trap it. Execution resumes in the correct location in the code, but I can't 
>find anything in the OS-9 manual about suppressing error messages.
>
> Can anyone help?
>
> Wayne
>
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list