Well I just started with hhvm/hack. But I wanted to display the errors to the browser but didnot got it working.
I set the ini settings as followed
e
Well it took me some searching but finally found the answer, see this github post. It can't however display fatal errors. But notices are displayed
So I wrote my own error handler; it is not complete but does the job for now.
Warning, no check for ini display_errors
set_error_handler(function ($errorNumber, $message, $errfile, $errline) {
switch ($errorNumber) {
case E_ERROR :
$errorLevel = 'Error';
break;
case E_WARNING :
$errorLevel = 'Warning';
break;
case E_NOTICE :
$errorLevel = 'Notice';
break;
default :
$errorLevel = 'Undefined';
}
echo '<br/><b>' . $errorLevel . '</b>: ' . $message . ' in <b>'.$errfile . '</b> on line <b>' . $errline . '</b><br/>';
});
It's possible to fall back to php when hhvm fails. Pretty simple to do that - https://bjornjohansen.no/hhvm-with-fallback-to-php. I understand you can attach php fallback per error code (like 404). So isn't it possible to fall back to php server that shows a page which loads the hhvm error log?