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
error_reporting(E_ALL);
ini_set('display_errors', '1');
According to a var_dump of ini_get
the values were set to
string(5) "32767"
string(1) "1"
But when I did
<?hh
error_reporting(E_ALL);
ini_set('display_errors', '1');
throw new InvalidArgumentException('test');
When I visited the page via de browser I would just get a white screen and a 500 http header. So no explaintion of the fatal/exception error.
Would I however go via the terminal hhvm index.php
It would show;
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'test' in /var/www/public/index.php:3
Stack trace:
#0 {main}
So now the question. How does it come I don't get any messages in the browser, but do in the cli? And the second one is, how do I get it working in the browser to show messages.
I came across this question and this one. But the first, well is the same, but unanswerd. And the second is saying something about static checking. IE that an int is given etc, at least that is what I think he means.
Other question I came by, which looked like mine, but again unanswered.
And according to the docs it should work I guess.
Reading more on the docs I came accross
Although display_errors may be set at runtime (with function ini_set()), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed.
So I thought well an Exception is a fatal error so I just did $test = $bar + 1;
This let in the cli to
Notice: Undefined variable: bar in /var/www/public/index.php on line 8
int(1)
Again in the browser
int(1)
So I don't get notices either.
When I restart hhvm service hhvm restart
I also get the error message Log file not specified under daemon mode.
don't know if it has anything to do with it