I have a simple try/catch. If an error is thrown I want a function to run but the page should continue running.
I am noticing, that the function isn't running. If I put a die() after my function , then the function runs, but my page stops.
Am I doing something wrong?
try {
$stmt->execute();
}
catch(Exception $e) {
sendError($e );
die( 'Error'); //neccesary or function doesn't run
}