From 9bae19198fdc7bfb71f900cfe6c1982cb2a80e4f Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 16:20:27 +0800 Subject: Revert "Fix up llexception.h's cross-platform SEH wrapper." This reverts commit 5ed8df22cd59680a685c4ada7daa5555bf59d4fe. --- indra/llwindow/llwindowwin32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llwindow/llwindowwin32.cpp') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index a781e638ee..97bd789134 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -160,7 +160,7 @@ HGLRC SafeCreateContext(HDC &hdc) GLuint SafeChoosePixelFormat(HDC &hdc, const PIXELFORMATDESCRIPTOR *ppfd) { - return LL::seh::catcher([hdc, ppfd]{ return ChoosePixelFormat(hdc, ppfd); }); + return seh_catcher(ChoosePixelFormat(hdc, ppfd)); } //static -- cgit v1.2.3 From bbe51e86249114cac4716c391e267c499a52847a Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 3 Jun 2025 16:21:58 +0800 Subject: Revert "Promote seh_catcher() et al. to llexception.{h,cpp} for general use." This reverts commit 71d777ea126e7f02cb46c11bdb606094ca06f75c. --- indra/llwindow/llwindowwin32.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/llwindow/llwindowwin32.cpp') 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 -- cgit v1.2.3