Solved

Globaly trap errors without ON ERROR GOTO

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to get all the API from website? 11 89
groupSumClump challenge 9 115
iSeries email authority 6 57
Need help making a program or form for inventory that exports to txt 8 41
A short article about a problem I had getting the GPS LocationListener working.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

773 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