Create an exceptions.php file, put it in the Lib
folder and fill it with all the *Exception
classes. Then include it in the application boot file.
require APP . 'Lib' . DS . 'exceptions.php';
All exceptions will become available for widespread use.
source share