Nui Engine
A game engine framework
Loading...
Searching...
No Matches
Exceptions.h
1#pragma once
2#include "Core/Common/Types.h"
3#include "Core/Common/NuiWin.h"
4
5namespace Nui
6{
12 inline String GetWin32ErrorString(DWORD errorCode)
13 {
14 char errorString[MAX_PATH];
15 ::FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM,
16 0,
17 errorCode,
18 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
19 errorString,
20 MAX_PATH,
21 NULL);
22
23 std::string message = "Win32 Error: ";
24 message += errorString;
25 return message;
26 }
27
28}