79081979

Date: 2024-10-12 21:38:40
Score: 0.5
Natty:
Report link

the MissingAbilityException is passed to the AccessDeniedHttpException, this one is inherits from some other Exception classes and more importantly from the RuntimeException class. The MissingAbilityException is passed up all the levels until it reaches the RuntimeException and you can (should, as i have not tested myself) access it with the getPrevious() method.

So you would still catch the AccessDeniedHttpException $e, but you can access the MissingAbilityException by doing $e->getPrevious();

Reasons:
  • No code block (0.5):
Posted by: suxgri