Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Get Call Stack

8 views
Skip to first unread message

Schof

unread,
Dec 13, 2002, 11:31:59 AM12/13/02
to
All of the error information is available in the ErrorObject. Unfortunately
the call stack does not seem to be available...

"Venugopal Vemuri" <vem...@hotmail.com> wrote in message
news:043401c29be6$ab5bd1e0$d4f82ecf@TK2MSFTNGXA11...
> Hi,
> I was in the process of designing an error handler for a
> project. I wanted to include the Call Stack information
> along with Err.Number, Err.Description, Err.Source as a
> message so that it would help in debugging. An early
> reply would be appreciated.
> Regards,
> Venugopal


Michael (michka) Kaplan [MS]

unread,
Dec 13, 2002, 1:41:59 PM12/13/02
to
Strike "seem to be". Its not.

Once long ago, as an Access/VB developer external to Microsoft, I decided
that I wanted the call stack. Period. Heady with the victory of figuring out
how to do callbacks in Access 97 (cf:
http://www.msofficemag.net/features/1998/05/vba199805kg_f/vba199805kg_d.asp)
and also perhaps feeling a little bored that none of the challenges of jobs
I was doing matched up how much fun that callback stuff was (<grin>), I got
started.

And then I found it: EbGetCallstackCount. And even better, there was
EbGetCallstackFunction which seemed amond other things to take an index
(presumably to get the call stack one function at a time by passing the
index of the items in the stack). I was so excited that I did not mind the
miscellaneous crashes as I experimented with calling these functions until
finally I had my goal: working code that called the count function and then
retrieved the [Unicode] string representing the callstack item.

And what did it say, you ask? The string that came back will forever be with
me. It said:

"<Running>"

Basically, you can't ever get a valid callstack unless you are in break
mode. And if you are in break mode then your code cannot be running. Doh!
Not just a "chicken and egg" problem, more like a "chicken who is allergic
to eggs" problem. :-)

Anyway, you can scratch this one off of the list of things you can do....


--
MichKa

This posting is provided "AS IS" with
no warranties, and confers no rights.

"Schof" <nos...@isp.com> wrote in message
news:#xobPVsoCHA.2764@TK2MSFTNGP09...

Sandra Daigle

unread,
Dec 13, 2002, 6:31:09 PM12/13/02
to
That's a keeper, thanks Michka!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Michael (michka) Kaplan [MS] wrote:
> Strike "seem to be". Its not.
>
> Once long ago, as an Access/VB developer external to Microsoft, I decided
> that I wanted the call stack. Period. Heady with the victory of figuring
> out how to do callbacks in Access 97 (cf:
>
http://www.msofficemag.net/features/1998/05/vba199805kg_f/vba199805kg_d.asp)
> and also perhaps feeling a little bored that none of the challenges of
> jobs I was doing matched up how much fun that callback stuff was
> (<grin>), I got started.
>
> And then I found it: EbGetCallstackCount. And even better, there was
> EbGetCallstackFunction which seemed amond other things to take an index
> (presumably to get the call stack one function at a time by passing the
> index of the items in the stack). I was so excited that I did not mind the
> miscellaneous crashes as I experimented with calling these functions until
> finally I had my goal: working code that called the count function and
> then retrieved the [Unicode] string representing the callstack item.
>
> And what did it say, you ask? The string that came back will forever be
> with me. It said:
>
> "<Running>"
>
> Basically, you can't ever get a valid callstack unless you are in break
> mode. And if you are in break mode then your code cannot be running. Doh!
> Not just a "chicken and egg" problem, more like a "chicken who is allergic
> to eggs" problem. :-)
>
> Anyway, you can scratch this one off of the list of things you can do....
>
>
>

0 new messages