Re: [udf-dlm-develop] preventing an "Execution Halted at:"
Brought to you by:
esm
|
From: Ed S. <es...@la...> - 2000-06-21 17:12:38
|
>I know of IDL's 'catch,
>error' functionality, but that doesn't stop the halting.
Ummmm... it doesn't? Here's what I do in read_im.pro :
;
; Open the UDF access. If it fails, bomb out nicely, and return scalar -1
;
Catch, err_sts
IF err_sts EQ 0 THEN BEGIN
fh = udf_open(key, start_date, end_date, _Extra=_e)
ENDIF ELSE BEGIN
IF NOT quiet THEN print, !Error_State.Msg
return, -1
ENDELSE
Catch, /Cancel
That has never given me a problem.
I'm sorry for not having coded UDF_OPEN() to return an invalid
filehandle (-1) on failure, instead of barfing. It's probably
too late to change that, but if there's enough support out
there, it could be done. Any comments?
^E
|