Consider this sample code:
<?
try {
throw new Exception('new');
} catch (Exception $ex) {
echo "caught";
}
?>
I assume this should just output the string "caught" when run. However, with display errors turned on, I see the exception shown on the web page like ( ! ) Exception: new in test.php on line 2 along with a dump of call stack and variables in scope.
With display errors off, it doesn't show the exception notice. Shouldn't the try catch block prevent the notice to be shown even with display errors on?
( ! )is in the error message? Literally? Strange.