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

Home » Public Forums » archive » Re: Silent errors in run-time
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: Silent errors in run-time [message #45833 is a reply to message #45832] Wed, 12 October 2005 09:28 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
otto.hyvarinen@fmi.fi wrote:
>> You need to "redirect output". Syntax varies slightly depending on which shell
>> you are running. In csh (and tcsh) I do something like this
>> idl >>& my_idl_log
>
>
> Unfortunately this doesn't help, because IDL opens a _window_, that
> needs to be clicked at. I can redirect my stdout and stderr where ever
> I want, but it doesn't make any difference. It is an IDL problem, not a
> shell script problem, I sincerly believe.

I thought you could simply turn off error reporting altogether but I
must be thinking of MATLAB since I can't find any reference to this in
the docs.

But you could insert a CATCH statement somewhere to handle the error,
maybe write some info to a file, then stop execution. All without IDL
reporting an error. You would also have to set !EXCEPT=0 to suppress
reporting of math errors (which CATCH doesn't catch). You may want to
structure it so you can easily report errors when you are debugging.


pro test_error

debug=0

if (debug) then begin
theError=0
catch, theError
if (theError ne 0) then begin
catch, /cancel
goto, theEnd
endif
endif

openr, lun, 'c:\nofile', /get_lun

theEnd:

end


-Rick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Format query
Next Topic: Re: declare variables

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

Current Time: Thu Oct 09 23:13:53 PDT 2025

Total time taken to generate the page: 0.16069 seconds