来自:网易博客
就目前我的了解,在两种情况下,PHP会报 Exception thrown without a stack frame in Unknown on line 0这种错误:
1)异常捕捉用了set_exception_handler导向,Exception里面执行另一个Exception
如下面这段代码,就会出现这种问题:
http://de.php.net/manual/de/function.set-exception-handler.php#88082
function error_handler($code, $message, $file, $line){ if (0 == error_reporting()) return; throw new ErrorException($message, 0, $code, $file, $line);}function exception_handler($e){ // ... normal exception stuff goes here print $undefined; // This is the underlying problem}set_error_handler("error_handler");set_exception_handler("exception_handler");throw new Exception("Just invoking the exception handler");