Greetings,
I am seeing an unexpected behavior in A2007 working on enhancements to my Robust VBA Error Handler. I am teaching the error handler to be able to interrogate various object types for additional error condition information.
My first task was to interrogate MS XML 6 DOMDocument60 objects. I am very nicely able to hand off the MS XML 6 object to the error handler, it is able to receive the object, identify it as such, and enumerate the parseError data contained within it. Example:
Next I coded up a similar solution to be able to interrogate ADODB.Command objects to enumerate through the error information in those types of objects.
I am seeing that the error information in the adoCMD object is getting cleared at the point execution passes from the place in the code where the error occurred to my global error handler. Everything else appears to be kept intact in the adoCMD object received in the error handler. The error branch, however, is completely cleared. ggggrrrrr.....
LOC in the worker code which calls the error handler:
LOC which receives the object in the error handler:
Suggestions please?
I am seeing an unexpected behavior in A2007 working on enhancements to my Robust VBA Error Handler. I am teaching the error handler to be able to interrogate various object types for additional error condition information.
My first task was to interrogate MS XML 6 DOMDocument60 objects. I am very nicely able to hand off the MS XML 6 object to the error handler, it is able to receive the object, identify it as such, and enumerate the parseError data contained within it. Example:
Code:
MSXML parseError:
errorCode: -1072896764
errorParametersCount: 0
errorXPath:
filepos: 806
line: 19
linepos: 50
reason: A name was started with an invalid character.
srcText: This email is being sent via the --> Production <-- Fandango Agent Server! Woo hoo!!! :-)
url:
I am seeing that the error information in the adoCMD object is getting cleared at the point execution passes from the place in the code where the error occurred to my global error handler. Everything else appears to be kept intact in the adoCMD object received in the error handler. The error branch, however, is completely cleared. ggggrrrrr.....
LOC in the worker code which calls the error handler:
Code:
Call errorhandler_MsgBox("Class: " & TypeName(Me) & ", Function: UpdateSortPosition()", , [B]adoCMD[/B])
LOC which receives the object in the error handler:
Code:
Sub errorhandler_MsgBox(ByVal strAppErrorMsg As String, Optional ByVal flgLogErrorToDisk As Boolean = True, [B]Optional ByRef objMultiType As Object = Nothing[/B])
Suggestions please?
Attachments
Last edited: