mirror of
https://github.com/filp/whoops.git
synced 2026-08-28 19:18:33 +00:00
Add applicationPaths to the example
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user