All exceptions thrown in Java code are encapsulated and thrown again as a COM error through the ISupportErrorInfo interface and the EXCEPINFO structure of IDispatch::Invoke(); 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.
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 |
Related tasks
Developing ActiveX application client code