Solved

Globaly trap errors without ON ERROR GOTO

Posted on 2008-06-12
3
660 Views
Last Modified: 2013-11-26
Is there any way of trapping the global error object in VB6 (ERR) without having to include a on ON ERROR GOTO statement in each procedure/function? When an error occurs I want it to be referred to my own error handling object? Can this be done with the limited OOP function that VB has?
0
Comment
Question by:whittinga2
[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 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 21768279
There is no global errorhandler in vb6

Because Visual Basic nests routines into local address space, all errors happen locally. An unhandled error in some routine that might be handled above that routine, in another error handler, should be considered unhandled because it will probably destabilize the application.

For more information:
http://www.brainbell.com/tutors/Visual_Basic/Tip_5_Have_an_error_handler_in_every_routine.htm
0
 

Author Comment

by:whittinga2
ID: 21768311
Good read - thanks!
0
 
LVL 10

Expert Comment

by:peetm
ID: 21768362
The original paper referred to is here: http://www.charteris.com/publications/white_papers/downloads/OnErrorGoto.pdf

It also formed part of MS-Press' Advanced VB5/6 books.



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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

737 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