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

Home » Public Forums » archive » Re: MESSAGE facility
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: MESSAGE facility [message #8757] Wed, 23 April 1997 00:00
peter is currently offline  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 Go to previous message
davidf is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: map un-projection
Next Topic: Re: New and Updated IDL Programs

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

Current Time: Sun Oct 12 01:24:39 PDT 2025

Total time taken to generate the page: 0.71980 seconds