Visual Basic Stats:

How to support the site


Site Wide Message: (current site time 7/29/2010 9:15:43 PM EDT)
  • We want your input! One of our sponsors wants to know your opinion about development related issues. Click here to tell us what you think.
  • Are you an emerging/young developer (aged 18-30)? If so, would you like the chance to affect future developer tools and products?
    If so, then click here to give your feedback.
 

Auto Error Trapper Addin

Print
Email
winzip icon
Submitted on: 5/30/2003 1:06:26 PM
By: Jason Stracner  
Level: Intermediate
User Rating: By 6 Users
Compatibility:VB 6.0

Users have accessed this code  5466 times.
 
author picture
(About the author)
 
     This code automatically adds centralized error trapping to your code. It reads an .ini file that it stores in the same folder as your project that contains two pieces of code. One is inserted into the top of every method and one is inserted in the bottom. This can be used as a last line of defense against unexpected errors. The default is to allow the user to Abort/Retry/Ignore the error instead of just crashing the program. It will also (optionally) automatically insert line number into your code so that you can use vb's Erl function to get the exact line number where your error occurred. WARNING: This program directly modifies your code! Be sure to backup your code before using it. I am totally not responsible for any damage to your code. Credit: This was adapted from the program 'Auto Error Handler' by Nathan Dennis.
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 8 submission(s) by this author

 

 
 Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:
 
Your Vote!

What do you think of this code(in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
5/30/2003 3:40:07 PMJason Stracner

Let me know what you think of this program.
(If this comment was disrespectful, please report it.)

 
5/31/2003 4:12:59 PMDream

Quite good, Ive made a few mods to it so it names each error_handler to suit the procedure, also so it numbers each procedure 10,20,30,40 instead of the whole form 1,2,3,4,5, etc, any ideas how you tell where the current mouselocation is at?
(If this comment was disrespectful, please report it.)

 
5/31/2003 9:29:23 PMJason Stracner

I have the line numbers to be the actual number of the line. That way you can remove the line numbers in the code and when you get an error you can still find that line because that is the real number for that line.
I like the idea of having it use a error_hadler label that has hte name of the method in it. Something like error_handler_for_Form_Load:. I might update it later to do that. Thanks Dream.
(If this comment was disrespectful, please report it.)

 
1/31/2005 10:02:50 AM

Exelente!!!!!!! Felicitaciones!!!!
(If this comment was disrespectful, please report it.)

 
2/25/2005 3:19:24 AM

It doesn't work.
It says:
Compile error:
Sub or Function not defined

and highlights funcHandleError.
(If this comment was disrespectful, please report it.)

 
5/10/2005 8:34:46 PMRamon_Morales

Great job. I tried to do this same thing a few years back and I couldn't get it quite to work right.

Awesome!
(If this comment was disrespectful, please report it.)

 
1/6/2006 11:39:39 AMZani

Really thanks man i was developing something just like this when come to my mind to search at psc first and bang here its the job all done and kindly shared by you...thanks a lot!
(If this comment was disrespectful, please report it.)

 
10/2/2006 1:54:57 PMMark J.


this is really great!

thank you
(If this comment was disrespectful, please report it.)

 
11/7/2007 11:44:37 PMLarknart

I really need this code.. but i dont know how to use it.. do i need to compile it? or do i need to add them into my project?
(If this comment was disrespectful, please report it.)

 
Add Your Feedback!

Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
To post feedback, first please login.