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

Home » Public Forums » archive » Re: how to clear error message
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: how to clear error message [message #73281 is a reply to message #73277] Wed, 03 November 2010 16:59 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to clear error message
Next Topic: summing mulit-D array along 1 dimension, at an angle to the rows

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

Current Time: Wed Oct 08 15:10:43 PDT 2025

Total time taken to generate the page: 0.00448 seconds