Error handling codes for ActiveX application clients
All exceptions that are thrown in the Java code are encapsulated and re-thrown as a COM error. The COM error is thrown through the ISupportErrorInfo interface and uses the EXCEPINFO structure of IDispatch::Invoke(), which is the Err object in Visual Basic and VBScript. Because there are no error numbers associated with Java exceptions, whenever a Java exception is thrown, the entire stack trace is stored in the error description text and the error number assigned is 0x6003.
In Visual Basic or VBScript, you need to use the Err.Number and Err.Description fields to determine the actual Java error. Non-Java errors are thrown as you would expect via the IDispatch interface; for example, if a method cannot be found, then error 438 (Object doesn't support this property or method) is thrown.
This table lists error numbers and a description of the error:
Error number Description 0x6001 Java Native Interface (JNI) error 0x6002 Initialization error 0x6003 Java exception. Error description is the Java stack trace. 0x6FFF General internal failure