Question : override err.raise?

Hey,

How would i go about overriding err.raise in vb6?

my end goal is the following:

every time err.raise is called in this project, i want to intercept it, stop it, and perform my own err.raise event/actions.

thanks a bunch!

Answer : override err.raise?

You can't replace the err object, but you can accomplish what you want to do... you just have to include error handling in every subroutine....

Public Sub SampleCode
  On Error Goto CatchError
  'Your subrotine code here
  Exit Sub
CatchError:
  Err.Raise YourErrorNumber, YourDescription
End Sub

Random Solutions  
 
programming4us programming4us