Solved

Getting the call stack on an error

Posted on 2000-04-21
6
130 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
Independent Software Vendors: 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 5 hours left to enroll

624 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