I have been getting back into C++ lately. I've been away from C++/CLI using C# instead for at least a year now and I am a bit rusty. I am looking at the base example for a Direct3D app for Windows 8 and cannot find anything that explains what the
DX::ThrowIfFailed
does. From what it says it will execute something if something in DirectX failed, but from the implementation it looks like it is being used for initializing stuff as the base for the Direct3D demonstrates:
Platform::String^ text = "Hello, DirectX!";
DX::ThrowIfFailed(
m_dwriteFactory->CreateTextLayout(
message->Data(),
message->Length(),
m_textFormat.Get(),
700, // maxWidth.
1000, // maxHeight.
&m_textLayout
)
);
Can someone explain to me how this function works. I see it scattared accross examples but no amount of googling has relieved proper documentation. Thank you ahead of time!