[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: !ERR and MPFIT
Pavel Romashkin <promashkin@cmdl.noaa.gov> writes:
>
> 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.
In this case it's more of a termination condition than an error. For
example, the user function may decide that a parameter has gotten out
of bounds unrecoverably. I would like MPFIT to return gracefully
rather than barfing if possible, so the user routine needs a way to
signal MPFIT that something is wrong.
Craig
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------