Report file and line where script died

Notice: This thread is very old.
mishak
Member | 94
+
0
-

It would be nice to have dump like message for accidental deaths.

R.I.P <file>#<number>

Sometimes when debugging I forget to remove die before last dump or some application is dying without reason. Reporting file and line where script died would be useful. And if it would be link that would be superb. Or as a panel with scull.

As Majkl578 suggested it should be possible using shutdown handler and backtrace.

It might be useful to have blacklist of places it would not report from like Application sending request and so on.

What do you think?

It is especially useful in cases when I have no idea why it is dying and grep is not helpful.

Last edited by mishak (2014-06-17 19:51)

David Grudl
Nette Core | 8229
+
0
-

I am not sure that this is possible. Can you try it?

mishak
Member | 94
+
0
-

I have tried but before register_error_handler backtrace is erased. I was not able to enable pcntl ext on my PC, maybe it would work via listening to some signals.