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

Home » Public Forums » archive » Re: Error handling and tracebacks
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: Error handling and tracebacks [message #40112] Wed, 21 July 2004 22:08 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Wallace writes:

> In short, I thought I might rid myself of this dilemma if I could
> somehow show them the error message with no trace. This is more
> *normal* to them and as such they'd actually *read* the error message
> like they should have in the first place.

Well, heck, something like this will work then:

Catch, theError
IF theError NE 0 THEN BEGIN
Print, !Error_State.Msg
RETURN
ENDIF

Now, throw the error with Message:

Message, 'Whoops! Did you read the docs?'

You get something like this:

%YourProgram: Whoops! Did you read the docs?

That's about as simple as it gets. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Error handling and tracebacks
Next Topic: ENVI: auto_wid_mng

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

Current Time: Thu Oct 09 22:00:28 PDT 2025

Total time taken to generate the page: 0.80144 seconds