comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Catching I/O errors on RESTORE
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Catching I/O errors on RESTORE [message #29706] Fri, 08 March 2002 10:46
MKatz843 is currently offline  MKatz843
Messages: 98
Registered: March 2002
Member
Here's in I/O error-trapping question for the IDL gurus out there...

Working in IDL 5.4 on SunOS UNIX, I'd like to catch errors
that occur when reading a bad or incomplete--but existing--
IDL SAVE file. I want to use ON_IOERROR, but it doesn't
seem to catch errors that occur with the RESTORE function.
Here's more information...

I create a smallish (100-200 bytes) disk file with

SAVE, x, y, z, filename="myfile.dat"

Since I have lots of programs running simultaneously, different
parts of my program or different IDL sessions may be
SAVEing and RESTOREing these files in quick succession.

Before I RESTORE, I always check for the existence of the file with
FRELUN, 10
OPENR, 10, filename, ERROR=err

Sometimes, the file exists but is empty (!), then IDL tries to RESTORE
and comes back with an END OF FILE error.

SO, I put in an error catcher:

ON_IOERROR, error_label

Yet the program still halts with an END OF FILE, and the error
trap is never activated. Any ideas?
I would like the RESTORE file to trip the error trap and go
nicely to my error-handling code.

Thanks, MKatz
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: "Max()" filter?
Next Topic: "Max()" filter?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:51:43 PDT 2025

Total time taken to generate the page: 0.00541 seconds