thread local vs. global system.raiseHook

This commit is contained in:
Araq 2011-10-23 01:12:24 +02:00
commit 2b323c638c
4 changed files with 22 additions and 8 deletions

View file

@ -194,8 +194,10 @@ proc quitOrDebug() {.inline.} =
proc raiseException(e: ref E_Base, ename: CString) {.compilerRtl.} =
e.name = ename
if raiseHook != nil:
if not raiseHook(e): return
if localRaiseHook != nil:
if not localRaiseHook(e): return
if globalRaiseHook != nil:
if not globalRaiseHook(e): return
if excHandler != nil:
pushCurrentException(e)
c_longjmp(excHandler.context, 1)