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

Home » Public Forums » archive » Generating errors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Generating errors [message #51363] Thu, 16 November 2006 07:32
Braedley is currently offline  Braedley
Messages: 57
Registered: September 2006
Member
Is the any way to generate a generic error if a given condition fails?
For example:

catch, the_error
if the_error ne 0 then begin
;fix what needs to be fixed
catch, /cancel
return ;so the user can try again
endif

;some other code

if n ne (*state).m then begin
;do something to notify user
;throw the error
endif

;some more code that may generate errors


BTW, this is in the event handler of a widget program, and it's assumed
that the problem can be fixed before the user tries again.
Is there any well defined mechanism to do what I want, or do I have to
do something like

a=intarr(3)
a[4]=0

in order to generate my error?
[Message index]
 
Read Message
Previous Topic: Re: Partial summation of a data set!
Next Topic: Re: Generating errors

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

Current Time: Fri Oct 10 12:41:38 PDT 2025

Total time taken to generate the page: 1.79115 seconds