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

Function GetGdiPlusErrorString

SampleFramework12/v1.00/Exceptions.h:73–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73inline std::wstring GetGdiPlusErrorString(Gdiplus::Status status)
74{
75 std::wstring errorString;
76
77 if (status == Gdiplus::GenericError)
78 errorString = L"Generic Error";
79 else if (status == Gdiplus::InvalidParameter)
80 errorString = L"Invalid Parameter";
81 else if (status == Gdiplus::OutOfMemory)
82 errorString = L"Out Of Memory";
83 else if (status == Gdiplus::ObjectBusy)
84 errorString = L"Object Busy";
85 else if (status == Gdiplus::InsufficientBuffer)
86 errorString = L"Insufficient Buffer";
87 else if (status == Gdiplus::NotImplemented)
88 errorString = L"Not Implemented";
89 else if (status == Gdiplus::Win32Error)
90 errorString = L"Win32 Error";
91 else if (status == Gdiplus::WrongState)
92 errorString = L"Wrong State";
93 else if (status == Gdiplus::Aborted)
94 errorString = L"Aborted";
95 else if (status == Gdiplus::FileNotFound)
96 errorString = L"File Not Found";
97 else if (status == Gdiplus::ValueOverflow)
98 errorString = L"Value Overflow";
99 else if (status == Gdiplus::AccessDenied)
100 errorString = L"Access Denied";
101 else if (status == Gdiplus::UnknownImageFormat)
102 errorString = L"Unknown Image Format";
103 else if (status == Gdiplus::FontFamilyNotFound)
104 errorString = L"Font Family Not Found";
105 else if (status == Gdiplus::FontStyleNotFound)
106 errorString = L"Font Style Not Found";
107 else if (status == Gdiplus::NotTrueTypeFont)
108 errorString = L"Not TrueType Font";
109 else if (status == Gdiplus::UnsupportedGdiplusVersion)
110 errorString = L"Unsupported GDI+ Version";
111 else if (status == Gdiplus::GdiplusNotInitialized)
112 errorString = L"GDI+ Not Initialized";
113 else if (status == Gdiplus::PropertyNotFound)
114 errorString = L"Property Not Found";
115 else if (status == Gdiplus::PropertyNotSupported)
116 errorString = L"Property Not Supported";
117
118 return L"GDI+ Error: " + errorString;
119}
120
121inline std::string GetGdiPlusErrorStringAnsi(Gdiplus::Status status)
122{

Callers 1

GdiPlusExceptionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected