/* PASTE YOUR PROVIDED EDUHUB CSS HERE */
PHP COURSE • LESSON 35

PHP Exceptions

Exceptions handle errors in a controlled way.

try-catch


<?php


try{


throw new Exception(
"Error Found"
);


}


catch(Exception $e){


echo $e->getMessage();


}


?>