public function init()
    {
        if (TIGA_DEBUG == true && !$this->app->isConsole()) {
            $whoops = new \Whoops\Run();

            if ($this->app['request']->isJson()) {
                $whoops->pushHandler(new \Whoops\Handler\JsonResponseHandler());
            } else {
                $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
            }

            $whoops->register();
        }
    }