Link to home
Start Free TrialLog in
Avatar of eetaz
eetaz

asked on

Automatically add error handling to code

I would like to be able to automatically add a custom error handling routine to my code and would like to know how to code a function or procedure to do this.

Avatar of halapaya
halapaya

In each of your methods, why can't you add an On Error Statement?

for ex.

Private Function Myfunc()integer
on Error goto Error_Handler
*
*
MyFunc=1 'successful
exit function

Error_Handler:
'your error handling code here
exit function

I think this is the way most do it. here you can do anykind of error checking and do whatever u want according ot the situation.

And what do u mean by automaticaly adding???

one product i can recommend is Failsafe by Numega

or you could write a Com addin for VB that did just what you wished
ASKER CERTIFIED SOLUTION
Avatar of Inteqam
Inteqam

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
dear eetaz,

i prefer to use Auto Error Handler..
you can download from http://www.softseek.com if you want

if you want to use more.. please register..

that software will fill your form, module, project with the code that you want.. automaticaly just by one touch..

tq..

-chai-
Avatar of eetaz

ASKER

I know about the shareware options available, I wanted to learn how this type of coding worked. Thanks for your response
Avatar of eetaz

ASKER

Thanks to all of you who took the time to respond. I am new to VB and want to learn new coding techniques and how they work. I have a shareware program that does the auto inserting of error code, I really wanted to see how to code something like that. Thanks again.