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 (m.sbmmt.com)!