Home  >  Article  >  php教程  >  Yii framework analysis (7) - Yii exception handling process

Yii framework analysis (7) - Yii exception handling process

黄舟
黄舟Original
2016-12-27 11:23:181341browse

The exception handling component works together with CApplication to handle all exceptions (uncaught). CApplication registers its handleException/handleError method as an event handling handle, that is, CApplication gets all exceptions and then hands them to the exception handling component for processing. The main job of exception handling is to display exceptions to the browser. Generally, the exception is handed over to an Action for display: if it is a normal request, an exception page is returned; if it is an ajax request, a json is returned, which is displayed by the browser. The server-side javascript displays json.

The above is the content of Yii framework analysis (7) - Yii's exception handling process. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn