Solved

Getting the call stack on an error

Posted on 2000-04-21
6
124 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
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:Ask_ED
Comment Utility
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
Comment Utility
.. 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
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 7

Expert Comment

by:Vbmaster
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now