Re: MESSAGE facility [message #8757] |
Wed, 23 April 1997 00:00 |
peter
Messages: 80 Registered: February 1994
|
Member |
|
|
David Fanning (davidf@dfanning.com) wrote:
: Wayne Landsman writes :
: > One change in IDL V5.0 is that the default response of the MESSAGE
: > facility is now to include a traceback. At least, as of V5.0B5 there
: > is no way to suppress this response, e.g. there is no /NOTRACEBACK
: > keyword. This can lead to the following disconcerting behavior. A
: > function call that in V4.0.1 yields the following response:
: >
: > IDL> a = dbfind('dec>0')
: > % DB_INFO: No data base file(s) opened
: >
: > becomes in V5.0B5
: >
: > STIS>a = dbfind('dec>0')
: > % DB_INFO: No data base file(s) opened
: > % Error occurred at: DB_INFO 112/share/idl/astro_util/db_info.pro
: > % DBFIND 137/share/idl/astro_util/dbfind.pro
: > % $MAIN$
: > % Execution halted at:$MAIN$
: I am absolutely in favor of having a traceback option on the MESSAGE
: routine. How many times have I known there was an error in my
: code, but not where it was!
: But I agree with Wayne. I don't want it as the default. I want my
: users to see something more gentle and helpful. Please give me
: a keyword that can turn the trace on and perhaps (am I asking
: too much?) a variable to save it in! :-)
Can this be handled by using CATCH? Or will that only work when the
error is not at the main program level?
Peter
|
|
|
Re: MESSAGE facility [message #8774 is a reply to message #8757] |
Tue, 22 April 1997 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Wayne Landsman writes :
> One change in IDL V5.0 is that the default response of the MESSAGE
> facility is now to include a traceback. At least, as of V5.0B5 there
> is no way to suppress this response, e.g. there is no /NOTRACEBACK
> keyword. This can lead to the following disconcerting behavior. A
> function call that in V4.0.1 yields the following response:
>
> IDL> a = dbfind('dec>0')
> % DB_INFO: No data base file(s) opened
>
> becomes in V5.0B5
>
> STIS>a = dbfind('dec>0')
> % DB_INFO: No data base file(s) opened
> % Error occurred at: DB_INFO 112/share/idl/astro_util/db_info.pro
> % DBFIND 137/share/idl/astro_util/dbfind.pro
> % $MAIN$
> % Execution halted at:$MAIN$
I am absolutely in favor of having a traceback option on the MESSAGE
routine. How many times have I known there was an error in my
code, but not where it was!
But I agree with Wayne. I don't want it as the default. I want my
users to see something more gentle and helpful. Please give me
a keyword that can turn the trace on and perhaps (am I asking
too much?) a variable to save it in! :-)
Cheers!
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
Customizable IDL Programming Courses
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
|
|
|