ID3D11Device::SetExceptionMode Method

Get the exception-mode flags.

Syntax

HRESULT SetExceptionMode(
  [in]  UINT RaiseFlags
);

Parameter

  • RaiseFlags [in]
    Typ: UINT

    A value that contains one or more exception flags; each flag specifies a condition which will cause an exception to be raised. The flags are listed in D3D11_RAISE_FLAG. A default value of 0 means there are no flags.

Rückgabewert

Typ: HRESULT

This method returns one of the following Direct3D 11 Return Codes.

Hinweise

Set an exception-mode flag to elevate an error condition to a non-continuable exception.

Whenever an error occurs, a Direct3D device enters the DEVICEREMOVED state and if the appropriate exception flag has been set, an exception is raised. A raised exception is designed to terminate an application. Before termination, the last chance an application has to persist data is by using an UnhandledExceptionFilter (see Structured Exception Handling). In general, UnhandledExceptionFilters are leveraged to try to persist data when an application is crashing (to disk, for example). Any code that executes during an UnhandledExceptionFilter is not guaranteed to reliably execute (due to possible process corruption). Any data that the UnhandledExceptionFilter manages to persist, before the UnhandledExceptionFilter crashes again, should be treated as suspect, and therefore inspected by a new, non-corrupted process to see if it is usable.

Anforderungen

Header

D3D11.h

Bibliothek

D3D11.lib

Siehe auch

ID3D11Device