From 2171aaa35c2c8487107699e183519f8aa3a79e71 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 14 Sep 2011 02:10:42 -0700 Subject: Use IsDebuggerPresent instead of the VC-only __try/__except --- Alc/ALc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Alc/ALc.c') diff --git a/Alc/ALc.c b/Alc/ALc.c index c5329cfa..79e759f6 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1346,12 +1346,9 @@ ALCvoid alcSetError(ALCdevice *device, ALCenum errorCode) if(TrapALCError) { #ifdef _WIN32 - /* Safely catch a breakpoint exception that wasn't caught by a debugger */ - __try { + /* DebugBreak() will cause an exception if there is no debugger */ + if(IsDebuggerPresent()) DebugBreak(); - } __except((GetExceptionCode()==EXCEPTION_BREAKPOINT) ? - EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { - } #elif defined(SIGTRAP) kill(getpid(), SIGTRAP); #endif -- cgit v1.2.3