+ 1
PHP Exception Handler
When an error occurred PHP script displays a fatal error. To avoid the error you should need to write the proper code to handle the exception in PHP script. PHP exception handler is a smart way to handle the exceptional condition. //trigger exception in try block and catch exception try { //something } catch (Exception $e) { echo 'Message: ' .$e->getMessage(); }
1 Antwort
+ 8
Or even better... make your own exception classes: https://code.sololearn.com/wE7zBruG55Z5/?ref=app