diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-06-03 16:21:58 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-06-03 16:21:58 +0800 |
commit | bbe51e86249114cac4716c391e267c499a52847a (patch) | |
tree | d0d71e71163aded7ad93eb026163e0c28729249d /indra/llwindow/llwindowwin32.cpp | |
parent | 9bae19198fdc7bfb71f900cfe6c1982cb2a80e4f (diff) |
Revert "Promote seh_catcher() et al. to llexception.{h,cpp} for general use."
This reverts commit 71d777ea126e7f02cb46c11bdb606094ca06f75c.
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 97bd789134..4fca74497f 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -160,7 +160,18 @@ HGLRC SafeCreateContext(HDC &hdc) GLuint SafeChoosePixelFormat(HDC &hdc, const PIXELFORMATDESCRIPTOR *ppfd) { - return seh_catcher(ChoosePixelFormat(hdc, ppfd)); + __try + { + return ChoosePixelFormat(hdc, ppfd); + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + // convert to C++ styled exception + // C exception don't allow classes, so it's a regular char array + char integer_string[32]; + sprintf(integer_string, "SEH, code: %lu\n", GetExceptionCode()); + throw std::exception(integer_string); + } } //static |