I played around with hack on an nginx dockered service. Everything is fine instead of provoke errors. For example this function:
echo add_one("1");
function add_one(int $x): int {
return $x+1;
}
This should produce an error because it is no integer. But instead returning the error message I get an 500 page.
Typing hhvm index.hh
to the console gaves me:
Catchable fatal error: Argument 1 passed to add_one() must be an instance of int, string given in /var/www/index.hh on line 7
How can I avoid the 500 page and print this error message instead?