Programmer's Guide > Using the AOM > Using COM to Access the AOM > COM Error Handling
  
COM Error Handling
All of the Arbortext Editor COM interfaces support the ErrorInfo COM interface and use it to pass error messages to the client if the called method fails. All supplied methods return an HRESULT which indicates success or failure and the general nature of the failure. Developers can use standard COM practices to retrieve error codes and error messages.
The DOM specification indicates that several methods will raise an exception upon certain types of failure. This is also the case for several AOM methods. Since the COM interface doesn't support exceptions, these failures will be turned into HRESULT return values. The specific value returned for a given exception can be found in the type library for the Arbortext-path\bin\editor.exe binary. They're also presented in the tables that follow. The general rule is that these exceptions will be returned as DOM_E_YYY_ERR for the DOMException, EventException and RangeException errors, TABLE_E_YYY_ERR for TableException errors, WINDOW_E_YYY_ERR for WindowException errors, and EXECUTE_E_YYY for AclException errors.
The following tables list the COM error codes and values for each range of errors. See the exception interface definitions in Interface Overview for the exception codes and their meanings.
DOM Error Codes
Error Code
Value
DOM_E_INDEX_SIZE_ERR
0x80042101
DOM_E_DOMSTRING_SIZE_ERR
0x80042102
DOM_E_HIERARCHY_REQUEST_ERR
0x80042103
DOM_E_WRONG_DOCUMENT_ERR
0x80042104
DOM_E_INVALID_CHARACTER_ERR
0x80042105
DOM_E_NO_DATA_ALLOWED_ERR
0x80042106
DOM_E_NO_MODIFICATION_ALLOWED_ERR
0x80042107
DOM_E_NOT_FOUND_ERR
0x80042108
DOM_E_NOT_SUPPORTED_ERR
0x80042109
DOM_E_INUSE_ATTRIBUTE_ERR
0x8004210A
DOM_E_INVALID_STATE_ERR
0x8004210B
DOM_E_SYNTAX_ERR
0x8004210C
DOM_E_INVALID_MODIFICATION_ERR
0x8004210D
DOM_E_NAMESPACE_ERR
0x8004210E
DOM_E_INVALID_ACCESS_ERR
0x8004210F
DOM_E_VALIDATION_ERR
0x80042110
DOM_E_UNSPECIFIED_EVENT_TYPE_ERR
0x80042148
DOM_E_BAD_BOUNDARYPOINTS_ERR
0x80042141
DOM_E_INVALID_NODE_TYPE_ERR
0x80042142
DOM_E_NO_SCHEMA_AVAILABLE_ERR
0x80042647
Table Interface Error Codes
Error Code
Value
TABLE_E_TABLE_OPERATION_FAILED_ERR
0x80042301
TABLE_E_TABLE_INVALID_INDEX_ERR
0x80042302
TABLE_E_TABLE_INVALID_DIRECTION_ERR
0x80042303
TABLE_E_TABLE_INVALID_ORIENTATION_ERR
0x80042304
TABLE_E_TABLE_INVALID_SPAN_ERR
0x80042305
TABLE_E_TABLE_INVALID_PARAMETER_ERR
0x80042306
TABLE_E_TABLE_INVALID_ATTRIBUTE_ERR
0x80042307
Window Interface Error Codes
Error Code
Value
WINDOW_E_WINDOW_NOT_SUPPORTED_ERR
0x80042401
WINDOW_E_WINDOW_HIERARCHY_REQUEST_ERR
0x80042402
WINDOW_E_WINDOW_WRONG_WINDOW_ERR
0x80042403
WINDOW_E_WINDOW_NOT_FOUND_ERR
0x80042404
WINDOW_E_WINDOW_INVALID_COLOR_ERR
0x80042405
WINDOW_E_WINDOW_INVALID_MODIFICATION_ERR
0x80042406
WINDOW_E_WINDOW_NO_MODIFICATION_ALLOWED_ERR
0x80042407
Acl.Execute Error Codes
Error Code
Value
EXECUTE_E_PARSE_FAILURE
0x80042200
EXECUTE_E_ERROR
0x80042201
EXECUTE_E_INTERNAL_ERROR
0x80042202
JScript maps the COM errors to the Error object, and VBScript maps the COM errors to the Err object. See JScript Exception Handling and VBScript Error Handling for details.