Where I store the custom exceptions in cakephp 3?

删除回忆录丶 提交于 2020-01-24 15:12:03

问题


I need to create a custom exception. But I dont have a clue where to store the file. In my opinion is app/Errors/NameException.php the right place. Is it?


回答1:


That is a fine place to store your Exceptions. The final choice does not matter much as there is no convention set for this type of classes. The autoloader will find them anyway if you declare them correctly.



来源:https://stackoverflow.com/questions/27410054/where-i-store-the-custom-exceptions-in-cakephp-3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!