handling errors while reading in data files [message #1352] |
Thu, 04 November 1993 14:39  |
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  |
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. |
|
|
|
|