Solved

Globaly trap errors without ON ERROR GOTO

Posted on 2008-06-12
3
649 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
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

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…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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 …

759 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

19 Experts available now in Live!

Get 1:1 Help Now