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

Home » Public Forums » archive » handling errors while reading in data files
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
handling errors while reading in data files [message #1352] Thu, 04 November 1993 14:39 Go to next message
jabarone is currently offline  jabarone
Messages: 15
Registered: May 1993
Junior Member
Hi, I'm trying to write an application using IDL that, among
other things, reads in a user specified data file. These files have to
be of a specified format to be read in correctly. Now we all know users
make mistakes and will sometimes specify files that are not of the
correct format. Now if this sort of thing happens, while running the
application I'm writing, eventually some sort of read error will be
generated by a READF or RMF statement, the result of which is that my
program crashes. This is unacceptable. I need a way to be able to handle
errors created by reading in files that are of the wrong format.
I was able to figure out how to handle the case when a file doesn't
exist, but not when it is of the wrong format. Does anyone have a
solution to this problem. Any help would be greatly appreciated.
Please email me any suggestions you might have.

Thanks in advance.

John Barone
jabarone@athena.mit.edu
Re: handling errors while reading in data files [message #1444 is a reply to message #1352] Sun, 07 November 1993 07:47 Go to previous message
gurman is currently offline  gurman
Messages: 82
Registered: August 1992
Member
In article <1993Nov5.164502.14641@stsci.edu>, perry@stsci.edu (Perry
Greenfield) wrote:

>
> You should read the section on Error-Handling Routines in
> the chapter "Programming Routines". I belive the routine
> ON_IOERROR will take care of your problem.

Note, however, that as of V3.1.x, ON_IOERROR does not work on Alpha AXP
systems (OSF/1 or OpenVMS). RSI claims there will be a fix in the next
release.
Joe Gurman

--
Joseph B. Gurman / NASA Goddard Space Flight Center/ Solar Data Analysis
Center / Code 682 / Greenbelt MD 20771 USA / gurman@uvsp.gsfc.nasa.gov
| Federal employees are still prohibited from holding opinions while at |
| work. Any opinions expressed herein must therefore be someone else's. |
Re: handling errors while reading in data files [message #1448 is a reply to message #1352] Fri, 05 November 1993 08:45 Go to previous message
perry is currently offline  perry
Messages: 3
Registered: September 1993
Junior Member
You should read the section on Error-Handling Routines in
the chapter "Programming Routines". I belive the routine
ON_IOERROR will take care of your problem.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: math symbols for PS.
Next Topic: Re: math symbols for PS.

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

Current Time: Sat Oct 11 14:00:56 PDT 2025

Total time taken to generate the page: 1.43770 seconds