<div dir="ltr">is there a way to tell whether we're running inside a try/catch block, as well as the type T expected by the catch(T) block (and perhaps also file/line info) ?<div><br></div><div>use case:</div><div><br>
</div><div>i'd like to customize my exception handler so that if I'm not running in a try/catch block, then I will pause instead of exiting so that I can start a debugger at that point. Note that pause inside the catch block is not good, as the stack would already be unwinded and there'd be no way to go back in time to the point where the relevant exception got thrown. Further, I'd like to customize this logic depending on the type expected by the catch block.</div>
<div><br></div><div>I see relevant functions in src/druntime/src/rt/deh2.d but nothing is exposed publicly.</div><div>thanks!</div></div>