-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
In the program below if the debugging code is linked in then the current error handler is called recursively until it crashes.
procedure Main()
local bOldErrorBlock
local n
setMode(24, 80)
if hb_isFunction("__DebugItem")
? "Debugger linked in"
endif
bOldErrorBlock := ErrorBlock({ |e| HandleError(e, bOldErrorBlock, .t.) })
begin sequence
n++
recover
? "Recovered"
end sequence
ErrorBlock({ |e| HandleError(e, bOldErrorBlock, .f.) })
begin sequence
n++
recover
? "Recovered"
end sequence
ErrorBlock(bOldErrorBlock)
return
function HandleError(e, bOldErrorBlock, lCarryOn)
? "HandleError " + hb_ValToStr(lCarryOn)
if lCarryOn
break
endif
return eval(bOldErrorBlock, e)
I love your addin! Thanks, Alex.
Reactions are currently unavailable