What does HRESULT 0x80020009 (DISP_E_EXCEPTION) mean?

 
Previous Next
DISP_E_BADVARTYPE DISP_E_OVERFLOW

DISP_E_EXCEPTION

Automation target raised an exception

DISP_E_EXCEPTION is HRESULT 2147614729 (0x80020009) from winerror.h. The documented description is “Exception occurred.” The value must be interpreted at IDispatch::Invoke returning component-provided failure details through EXCEPINFO.

The invoked method or property executed far enough to raise an application exception rather than an argument-binding error.

Where the result appears

  • This result is returned while Automation binds or executes IDispatch::Invoke returning component-provided failure details through EXCEPINFO.

Map this result to one concrete invocation and one concrete object or metadata identity before interpreting the human-readable description.

Typical causes and interpretation

Common cause categories are: application validation fails; a script exception escapes; a server translates its internal error into EXCEPINFO; property code throws. The evidence should distinguish configuration, lifetime, input, identity, resource, and version failures rather than grouping them.

Key distinction: the invoked method or property executed far enough to raise an application exception rather than an argument-binding error.

Evidence to preserve

  • Record it with the object CLSID or ProgID, interface identity, member DISPID, dispatch flags, and type-library version.
  • Capture EXCEPINFO source, description, help context and scode; member DISPID; inputs; component logs; deferred-fill callback result.

For privacy-safe diagnosis of it, capture the call schema and state transitions but hash or omit confidential payloads.

Correct handling and recovery

The appropriate recovery is to preserve EXCEPINFO before freeing BSTRs, report the component-specific message safely, and correct the underlying application condition rather than changing dispatch syntax.

Practical scenario

A report server throws a domain exception for a closed accounting period; the client displays the sanitized EXCEPINFO description and does not retry.

Difference from related HRESULTs

DISP_E_BADCALLEE indicates a broken callee contract; it is the normal Automation container for an application-level exception.

References


Looking for a different code? Search another status or error code.