Updated ThrowIfFailed (markdown)

Chuck Walbourn 2015-12-04 09:32:43 -08:00
Родитель 49217f3ae9
Коммит ffdd06f656
1 изменённых файлов: 2 добавлений и 2 удалений

@ -20,8 +20,8 @@ For "modern" Direct3D programming, the recommended solution is to throw a C++ ex
The usage is very simple.
DX::ThrowIfFailed(m_d3dDevice->CreateTexture2D(&depthStencilDesc,
nullptr, &depthStencil));
DX::ThrowIfFailed( device->CreateTexture2D(&depthStencilDesc,
nullptr, &depthStencil) );
``DX::ThrowIfFailed`` should be used whenever a failure is fatal and should result in 'fast-fail' of the application. Otherwise, traditional ``if FAILED(hr)`` or ``if SUCCEEDED(hr)`` pattern should be used to handle failures that the application can handle.