I have an app that will be used by two different customer systems. Both have their own error handling routines but they differ from each other.
What I'd like to do is create a simple sub which recieves an error in and then uses its attributes to call the apropriate error handling for the system. Something like:-
The trouble is that when I call this sub passing in err as an object I get a type mismatch. If I change errIn to a long the type mismatch goes away and err default property (number) gets passed in. But then I've lost access to the other attributes.Code:Public Sub pcError(errIn As error) Select Case gstrSource Case "SystemA" Call SystemAErrors(Err.number, err.description, err.source) Case "SystemB" Call SystemBErrors(Err.Number, err.Source, Err.Description) End Select End Sub
I could pass in the attributes individually but that means alot of parms (I've simplified the code above, the error handling routines use most of the err attributes plus a few more bits of info I'll pass in as parms) and it would be far more elegant to pass in the error object if I could.
Any suggestions?


Reply With Quote
