MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / DXException

Class DXException

SampleFramework12/v1.00/Exceptions.h:205–231  ·  view source on GitHub ↗

Exception thrown when a DirectX Function fails

Source from the content-addressed store, hash-verified

203
204// Exception thrown when a DirectX Function fails
205class DXException : public Exception
206{
207
208public:
209
210 // Obtains a string for the specified HRESULT error code
211 DXException(HRESULT hresult) : errorCode(hresult)
212 {
213 message = GetDXErrorString(hresult);
214 }
215
216 DXException(HRESULT hresult, LPCWSTR errorMsg) : errorCode(hresult)
217 {
218 message = L"DirectX Error: ";
219 message += errorMsg;
220 }
221
222 // Retrieve the error code
223 HRESULT GetErrorCode() const throw ()
224 {
225 return errorCode;
226 }
227
228protected:
229
230 HRESULT errorCode; // The DX error code
231};
232
233// Exception thrown when a GDI+ function fails
234class GdiPlusException : public Exception

Callers 3

DXCallFunction · 0.85
CompileShaderFunction · 0.85
CreateRootSignatureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected