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

Home » Public Forums » archive » Re: !ERR and MPFIT
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: !ERR and MPFIT [message #17897 is a reply to message #17886] Wed, 17 November 1999 00:00 Go to previous messageGo to previous message
Pavel Romashkin is currently offline  Pavel Romashkin
Messages: 166
Registered: April 1999
Senior Member
I apologize if I am missing a problem with error handling that Craig is
solving. I just want to ask why can't you use CATCH to handle errors
conditions? It seems to me that CATCH combined with MESSAGE procedure works
quite well for user-defined errors, and CATCH by itself works great for
internal IDL routines. This also eliminates the need for separate error
handlers.

Cheers,
Pavel

Craig Markwardt wrote:

> Unfortunately I chose to use the !ERR system variable. If !ERR is set
> to a negative number, then MPFIT aborts the run, assuming that there
> was an unrecoverable error.
>
> I now realize that using !ERR was probably a mistake. Why? RSI seems
> to want to make it obsolete. Through their error-handling flavor of
> the month program, !ERR seems to have fallen out of favor. Also,
> there are quite a few actions which might set !ERR accidentally in the
> user's function without actually signalling an error condition.
>
> So I have two questions:
>
> * to people who use MPFIT: does anybody actually use the !ERR status
> variable to control the fitting process? If not, then I would
> consider removing it.
>
> * to everybody: any suggestions on how to generically signal an error
> condition? My thoughts were:
>
> - ERROR keyword variable - don't like this, since then the
> function has to accept keywords
>
> - define a new system variable - don't like this either, since
> it's hard to do system variables right
>
> - common block variable - not very pretty, but gets the job done.
>
> To be clear, this is some kind of error flag that a user routine would
> (optionally!) set to signal an abnormal termination condition. Right
> now I am leaning toward the common-block approach. Sorry David.
>
> Thanks,
>
> Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: determining the display size (IDL)
Next Topic: Re: Floating base widget

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

Current Time: Sun Oct 12 03:57:02 PDT 2025

Total time taken to generate the page: 1.60079 seconds