Yii Error Handler with Whoops ¶
Integrates the Whoops library into Yii 1.1.
Instead of depending on an action to display error stuff, this error handler calls directly Whoops methods to handle the problems for you. They automatically outputs the error page, so you don't need to have an action only for that.
However, I do recomend you to set the default errorHandler in production servers, since you probably don't want to show users useful debug information, right? ;)
If you're using Composer, I strongly recomend you to create a
vendoralias if you haven't yet. Add this to the beginning of your
~~~~ Yii::setPathOfAlias('vendor', DIR.'/../../vendor'); ~~~~
config/main.phpwith the error handler class. Example:
~~~~ 'errorHandler' => ['class' => 'vendor.igorsantos07.yii-whoops.WhoopsErrorHandler'] ~~~~