Files
zhamao-framework/src/ZM/Exception/Handler.php

28 lines
670 B
PHP
Raw Normal View History

2022-11-08 17:28:07 +08:00
<?php
2022-11-08 17:33:25 +08:00
declare(strict_types=1);
2022-11-08 17:28:07 +08:00
namespace ZM\Exception;
2022-11-15 21:48:46 +08:00
use OneBot\Exception\ExceptionHandler;
use ZM\Exception\Solution\SolutionRepository;
2022-11-08 17:28:07 +08:00
class Handler extends ExceptionHandler
2022-11-08 17:28:07 +08:00
{
public function __construct()
{
2022-11-15 21:48:46 +08:00
parent::__construct();
/** @noinspection ClassConstantCanBeUsedInspection */
$ns = 'NunoMaduro\Collision\Handler';
// TODO: 在 LibOB 发布新版时移除检查
if (class_exists($ns) && method_exists($this, 'tryEnableCollision')) {
$this->tryEnableCollision(new SolutionRepository());
}
2022-11-08 17:28:07 +08:00
}
2022-11-08 17:33:25 +08:00
public function handle(\Throwable $e): void
2022-11-08 17:28:07 +08:00
{
2022-11-15 21:48:46 +08:00
$this->handle0($e);
2022-11-08 17:28:07 +08:00
}
}