PHP Fatal error: Uncaught exception 'Exception'
问题 I'm playing around with exceptions in PHP. For example, I have a script that reads a $_GET request and loads a file; If the file doesn't exists, an new exception should be thrown: if ( file_exists( $_SERVER['DOCUMENT_ROOT'] .'/'.$_GET['image'] ) ) { // Something real amazing happens here. } else { throw new Exception("The requested file does not exists."); } The problem is that, when I try to supply an non existent file for the test, I got a 500 error instead of the exception message. The