Skip to content

Instantly share code, notes, and snippets.

View Iyongbudiarso's full-sized avatar
😸

Iyong Budiarso Iyongbudiarso

😸
  • Bandung, Jawa Barat, Indonesia
View GitHub Profile
@jlamim
jlamim / hooks.php
Created November 8, 2016 21:08
Whoops & CodeIgniter - hooks.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$hook['pre_system'] = array(
'class' => 'WhoopsErrorHandler',
'function' => 'WhoopsConfig',
'filename' => 'WhoopsErrorHandler.php',
'filepath' => 'hooks',
'params' => array()
);
@jlamim
jlamim / WhoopsErrorHandler.php
Created November 8, 2016 21:04
Whoops & CodeIgniter - WhoopsErrorHandler.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class WhoopsErrorHandler {
function WhoopsConfig()
{
$whoops = new \Whoops\Run;
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
$whoops->register();
}