Hướng dẫn php fatal error example
I'm using the following script to use a database using PHP: Show Nội dung chính
Now, I want to use this database handle to do a request using this code:
Here is the problem:
Note: Line 32 is the That is to say, the script crashes, and the try/catch seems to be useless. Do you know why this second try/catch don't works and how to solve it? Thanks for the help! EDIT: There are some really good replies. I've validated one which is not exactly what I wanted to do, but which is probably the best approach. demis dot palma at tiscali dot it ¶ 6 years ago
lubaev dot ka at gmail dot com ¶ 5 years ago
diogoca at gmail dot com ¶ 2 years ago
(function(int $number, string $message) { Table of Contents
PHP has an exception model similar to that of other programming languages. An exception can be If an exception is thrown and its current function scope has no The thrown object must be an instance of the Exception class or a subclass of Exception. Trying to throw an object that is not will result in a PHP Fatal Error. As of PHP 8.0.0, the
|