yii-whoops Integrates Whoops into Yii error handling flow

Yii Error Handler with Whoops

  1. Usage
  2. Sample screenshot

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? ;)

Usage

  1. Install it:

    • Using Composer (it will automatically install Whoops main libraries as well): ~~~~ composer require igorsantos07/yii-whoops:1 composer install ~~~~
    • Or downloading and unpacking it in your extensions folder.
  2. If you're using Composer, I strongly recomend you to create a vendor alias if you haven't yet. Add this to the beginning of your config/main.php:

    ~~~~ Yii::setPathOfAlias('vendor', DIR.'/../../vendor'); ~~~~

  3. Replace your errorHandler entry at config/main.php with the error handler class. Example:

    ~~~~ 'errorHandler' => ['class' => 'vendor.igorsantos07.yii-whoops.WhoopsErrorHandler'] ~~~~

Sample screenshot

pqt8fK4.png

0 0
2 followers
239 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Error Handling
Developed by: igorsantos07
Created on: May 12, 2014
Last updated: 10 years ago

Downloads

show all

Related Extensions