Re: how to clear error message [message #73277 is a reply to message #73276] |
Wed, 03 November 2010 17:58   |
Truong Le
Messages: 42 Registered: September 2010
|
Member |
|
|
On Nov 3, 7:59 pm, wlandsman <wlands...@gmail.com> wrote:
> On Nov 3, 7:43 pm, ThanhThoan Nguyen <marct...@gmail.com> wrote:
>
>>>> When I try to read a bad FITS file I obtain the following error
>
>>>> % MRD_HREAD: Warning-Invalid characters in header
>
>> I am trying to loop over several FITS files, and I want to be able to
>> catch
>> this error and move on to the next FITS file. With the silent keyword
>> I don't
>> think this will resolve my problem.
>
> Note that MRD_HREAD is not printing an error message, but an
> "informational" message.
> Below is the relevant code within MRD_HREAD
>
> ; Check that there aren't improper null characters in strings that are
> causing
> ; them to be truncated. Issue a warning but continue if problems are
> found.
>
> w = where(strlen(block) ne 80, Nbad)
> if (Nbad GT 0) then begin
> if ~keyword_set(SILENT) then message, /INF, $
> 'Warning-Invalid characters in header'
> block[w] = string(replicate(32b, 80))
> endif
>
> You might be able to catch the error if you change the /INFORMATIONAL
> to /CONTINUE.
>
> --Wayne
I am sorry but are you suggesting that I modify the MRD_HREAD
procedure?
|
|
|