29 template <
class E,
class... Args>
31 inline
void throwTrace(const
std::
string &
msg, Args&&... args)
45 const char *what()
const override;
53 throwTrace<Win32Error>(
msg, ::GetLastError());
68 const char *what()
const override;
76 const char *what()
const override;
85 static_assert(std::is_base_of<DXError, T>::value,
"T must inherit DXError");
87 throwTrace<T>(
msg, hr);
91 class DXError :
public std::runtime_error {
94 const char *what()
const override;
__declspec(noreturn) inline void throwTrace(const std
Throw exception with (msg + stacktrace) message.
std::string createStackTraceMsg(const std::string &msg)
Returns (msg + stacktrace) string.
void checkDXResult(HRESULT hr, const std::string &msg)
FrameworkError(const std::string &msg)
XAudioError(const std::string &msg, HRESULT hr)
WinSockError(const std::string &msg, int code)
char msg[LINE_DATA_SIZE-sizeof(LARGE_INTEGER)-sizeof(uint32_t)]
void checkWin32Result(bool cond, const std::string &msg)
DIError(const std::string &msg, HRESULT hr)
DSError(const std::string &msg, HRESULT hr)
D3DError(const std::string &msg, HRESULT hr)