Rows:
catch(Exception $e){
throw $e;
}
It makes no sense. When you catch the Exception, you have to do something with the exception:
catch(Exception $e){
error_log($e->getMessage());
die('An error has occurred');
}
But in your case, the Exception is thrown directly into the external try-block that has already occurred.
If you change your code to:
Would create the same behavior.
source
share