Solved

Getting the call stack on an error

Posted on 2000-04-21
6
126 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
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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

786 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