is there a way to install a global handler for exceptions?

Right now if I want to log all exceptions, I use approach from ShoreLine
and create a PreDebugAction which is activated when any "unhandled"
exception occurs.

That would be good enough, however the Debugger has zero knowledge of the
exception that is actually occuring, as Exception>>debug passes on only the
title. So if I want to get back to the original exception and maybe log it
with beacon, I need to do a lot of stack and context shenanigans:

runDuring: [ (debugger session interruptedProcess suspendedContext stack
detect: [ :context | context receiver isKindOf: Exception ]) receiver emit ]

Is there a better way to approach this?


Reply via email to