Now I see what you are trying to do. In development mode I've been
using the following "trick" for a long time:
If I ever reach a point where an unexpected error occurs and I know
that there is a coding mistake that I must take care of, I first put
out an alert, then add a call to a non-existent handler - like this:
on ThisGlobalHandler()
...
if bError then
alert("A message and variables that might help track down the bug ... ")
DebuggerBreak()
end if
-- Normal code
So, in the case of an error, first I get notification of what went
wrong and some basic variable information. Then, by calling the
non-existant "DebuggerBreak()", the debugger window opens showing me
the stack trace of how I got to this point. I've found this approach
to be very helpful in tracking down unexpected errors.
Probably not what you want for runtime, but in development mode it
has proven to be very helpful.
Irv
At 12:08 PM -0400 5/14/01, Robert Wingate wrote:
> > I can't answer your question, but I would like to know what your
>> application for this functionality would be.
>
>I stuff my apps to the gills with error checking. In this particular
>case, I'm talking to an Oracle data source for error logging. I'd love
>to be able to do the following:
>
><pseudo>
>
>on ThisGlobalHandler()
> ...
> if bError then
> oErrLog.mLog( the currentHandler, strDescr, intSeverity, bActionReq
>)
>
> -- or better yet, this:
> oErrLog.mLog( callStack[ callStack.count ], strDescr, intSeverity,
>bActionReq )
>
> end if
>end
>
></pseudo>
>
>Right now, I'm having to use:
>
>oErrLog.mLog( "ThisGlobalHandler", strErr, etc ) <-- I DON'T LIKE THIS
>
>Something like 'the currentHandler' would be really handy for this type
>of error-logging scenario, and as Christopher Watson suggested, 'the
>callStack' would be even better. Director displays this into in the
>debugger; why not provide access to it from Lingo?
>
>And to finally get around to my point: I'd like to use
>scriptObj.handlers() to build a COM-esque IUnknown::QueryInterface, but
>without a smart way of knowing which handler is curently executing,
>there's not much sense in it.
>
>Rob
>
>/*********************************
>* Rob Wingate, Software Human *
>* http://www.vingage.com *
>* mailto:[EMAIL PROTECTED] *
>*********************************/
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
>email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo. Thanks!]
--
Lingo / Director / Shockwave development for all occasions.
(Home-made Lingo cooked up fresh every day just for you.)
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]