mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 10:49:22 +02:00
Add $whoopsHandler as variable, can be used by other scripts
This commit is contained in:
parent
da1816cc13
commit
b0c8cf2ecd
@ -9,16 +9,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
use MyAAC\Exceptions\SensitiveException;
|
use MyAAC\Exceptions\SensitiveException;
|
||||||
|
use Whoops\Handler\PlainTextHandler;
|
||||||
|
use Whoops\Handler\PrettyPageHandler;
|
||||||
|
use Whoops\Run;
|
||||||
|
|
||||||
if (class_exists(\Whoops\Run::class)) {
|
if (class_exists(Run::class)) {
|
||||||
$whoops = new \Whoops\Run;
|
$whoops = new Run;
|
||||||
if(IS_CLI) {
|
|
||||||
$whoops->pushHandler(new \Whoops\Handler\PlainTextHandler);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$whoopsHandler = IS_CLI ? (new PlainTextHandler()) : (new PrettyPageHandler());
|
||||||
|
|
||||||
|
$whoops->pushHandler($whoopsHandler);
|
||||||
$whoops->register();
|
$whoops->register();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user