Solved

Getting the call stack on an error

Posted on 2000-04-21
6
129 Views
Last Modified: 2010-05-02
is there anyway to dump the call stack if an unhandeled error occurs?


... all the points i have
0
Comment
Question by:hess
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:Ask_ED
ID: 2739326
Hi,

Try: VBIDEUtils add-ins
http://www.geocities.com/ResearchTriangle/6311/vbideutils.htm

among its features include
1) Add simple error handler to your code
2) Add enhanced error handler with call stack tracing

Hope this helps
ED
0
 
LVL 7

Accepted Solution

by:
Vbmaster earned 25 total points
ID: 2741021
.. And if you want to do the same but for no $$$ you could iterate thru all the forms/classes (just loop thru the files stated in the .vbp file) adding a line to all procedures/functions saving the name of the procedure/function to a textfile. When a error occurs then you look at the textfile - basically the same behaviour as the program above.
0
 

Author Comment

by:hess
ID: 2741157
i actually just did that myself... but only had to do it for about 180 for the estimated 1000 subs of my program... what a pain
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:Vbmaster
ID: 2741746
Hell, you're not supposed to do it manually ;)  Doing it automatically will be a better solution because you can also make the logging include all parameters easy. Maybe you need the parameters too to know what went wrong in a procedure/function.
0
 

Author Comment

by:hess
ID: 2741925
I find out from the error message the gave me... it was just a cut and paste job and now i can use find replace to quickly turn all that code on or of since it all starts with
If bDebug then print #66,

.... it's not that bad... problem is is when one sub calls 3 others then goes back to the first and crashes... that is why i wanted the call stack instead.
0
 

Author Comment

by:hess
ID: 2785308
This is what i ended up doing. It worked ok... if one sub is fired it writes it's text then it calls 4 more subs that call subs in turn... it should also be written to say where subs end ... then if you used a procuder to do the writing you could indent the written lines to see your call structure... this would be nice... maybe i'll write a program to d that and make 600$ per sale... oh well, thank you
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JSON Response and request in VB6 application 11 1,062
Prevent user closing word document opened with VB6 6 89
vbModal 12 74
Error with a code discussed on this page 5 51
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question