ingeniasoftware / luthier-ci

Improved routing, middleware support, authentication tools and more for CodeIgniter 3 framework
https://luthier.ingenia.me/ci/en/
MIT License
150 stars 38 forks source link

Whoops does not work with Luthier-ci #16

Closed robertsanseries closed 6 years ago

robertsanseries commented 6 years ago

while adding luthier-ci, the library screams stops working.

https://stackoverflow.com/questions/47190068/codeigniter-3-with-whoops?rq=1

http://www.universidadecodeigniter.com.br/whoops-error-handling-personalizado-no-codeigniter/

andersonsalas commented 6 years ago

Hi @robertsanseries, just add another index to the $hook array:

# application/config/hooks.php

$hook = Luthier\Hook::getHooks();

$hook['pre_system'][] = function(){
    $whoops = new Whoops\Run;
    $whoops->pushHandler(new Whoops\Handler\PrettyPageHandler());
    $whoops->register();
}; 
robertsanseries commented 6 years ago

Thanks! :D