Yii: Catching all exceptions for a specific controller

前端 未结 5 1795
日久生厌
日久生厌 2020-12-25 15:08

I am working on a project which includes a REST API component. I have a controller dedicated to handling all of the REST API calls.

Is there any way to catch all exc

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-25 15:15

    You can write your own actionError() function per controller. There are several ways of doing that described here

提交回复
热议问题