Menu
I’m trying to throw an exception and error out of a function.
Currently I get this error
>
Fatal error: Uncaught Exception: You don’t have permission to do this. in /home2/grettd/public_html/oop/player.php:397 Stack trace: #0 /home2/grettd/public_html/admin/playerAdd-update.php(104): Player->updateDatabase() #1 {main} thrown in /home2/grettd/public_html/oop/player.php on line 397
I was hoping for a cleaner error like here
here’s my code
“`
if ($Session->validateAccess(2) == false){
throw new Exception(‘You don’t have permission to do this.’);
exit();
}