Add applicationPaths to the example

This commit is contained in:
Denis Sokolov
2016-10-11 18:32:23 +03:00
parent 50f5a53801
commit 3f5cbd0e6a
2 changed files with 10 additions and 1 deletions
+6 -1
View File
@@ -20,6 +20,7 @@ use Whoops\Handler\PrettyPageHandler;
use Whoops\Run;
require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/lib.php';
class Exception extends BaseException
{
@@ -36,6 +37,8 @@ $handler->addDataTable('Ice-cream I like', [
'Vanilla' => 'ew',
]);
$handler->setApplicationPaths([__FILE__]);
$handler->addDataTableCallback('Details', function(\Whoops\Exception\Inspector $inspector) {
$data = array();
$exception = $inspector->getException();
@@ -72,7 +75,9 @@ function fooBar()
function bar()
{
fooBar();
whoops_add_stack_frame(function(){
fooBar();
});
}
bar();