Home > Software engineering >  VB how to capture the global exception?
VB how to capture the global exception?

Time:10-09

VB how to capture the global exception?

CodePudding user response:

The hook, capture

CodePudding user response:

What is the global exception?

On error goto errhandler
Can be used in any module

CodePudding user response:

The original poster is wanted to write a code somewhere in engineering, and then capture the whole project runtime errors processing?

No, at least not VB6

CodePudding user response:

Mark, also want to know, vb function are not like Java throw, the suddenly a err sometimes put a program are put up

CodePudding user response:

Check the related API, we can

CodePudding user response:

VB6 runtime errors can only use VB6 wrong statements capture.

The VB6 errors, such as memory read/write permissions errors, such as can be done with SEH.

CodePudding user response:

It is not!
Is likely to be deliberate, Microsoft was to push the COM model,
Means: small modules are bad, just want to write the program, oven rebuilt to quickly!

CodePudding user response:

Should modify the vb mistake hook can use a global exception handling code segment,

Need to change the import table part of the process in the memory image,,,, time for a long time to remember,

Each vb subroutine, a piece of code at the beginning of a subroutine has a piece of code, the compiler put in to catch exceptions,
If used on the error,,, such a custom exception handler, the compiler to join this code is part of the change, with the programmer own exception handler to replace the default handler,
The default code, the compiler join is handled by vb exception handler, is actually a function (you can find it on the address from the import table), if the import table in repairing the content of the modified module for himself to the address of a subroutine address, can handle any exceptions that the whole process (),

CodePudding user response:

http://topic.csdn.net/t/20040418/21/2980639.html

CodePudding user response:

Answer, 9/f, support, the feeling is close to the original poster's intentions
  • Related