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

Home » Public Forums » archive » Another Call_Procedure Surprise
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Another Call_Procedure Surprise [message #74631] Wed, 26 January 2011 09:58
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I had another Call_Procedure surprise this morning. (You
recall that Call_Procedure doesn't flush the graphics
pipeline on UNIX machines, discovered last week.) This
morning I learned it is impossible to catch errors
generated when Call_Procedure fails. In fact, there
is no way to *determine* if Call_Procedure has failed!

I had to cobble something together in my FSC_Window
program. (I've been working on improved error handling
and messages this morning.) What I do in the module
that uses Call_Procedure is assume failure. (Always
a pretty safe bet!) Then I reset the !Error_State system
variable before I use Call_Procedure.

success = 0
Message, /RESET
Call_Procedure, ....

If an error occurs, the !Error_State.MSG field will be
set to the error message. If it is still a null string,
I probably executed the command successully, so I can
change my success flag.

IF !Error_State.MSG EQ "" THEN success = 1

I'll make some notes about this when I get a few spare
minutes, but I thought it was worth mentioning.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Workaround for lack of foo.([]) capability with structures?
Next Topic: Coyote Graphics Update

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

Current Time: Sat Oct 11 04:42:28 PDT 2025

Total time taken to generate the page: 0.72234 seconds