They way I handle this is just to have a variable which I update at key points of code execution.
There are whole swathes of code that can never cause me trouble.
So just before some code block, i set a global integer variable to a number.
It doesnt need to be a line number: its a sequence number
[code]debugsection = 1
//some code
debugsection = 2
//some more code
[/code]
If a routine drops into an exception handler, I know the routine name, and I know the last section number reached without error.
the error then lies between the debugsection reported by the handler, and the next one.
That costs maybe 100 bytes per method, and is totally under my control
If I want more expressive handling and dont care about file size, I can make the variable into a string and use words instead.