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

27 lines
551 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 OneBot\Exception\ExceptionHandlerInterface;
2022-11-08 17:28:07 +08:00
2022-11-15 21:48:46 +08:00
class Handler extends ExceptionHandler implements ExceptionHandlerInterface
2022-11-08 17:28:07 +08:00
{
public function __construct()
{
2022-11-15 21:48:46 +08:00
parent::__construct();
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
{
if ($e instanceof ZMKnownException) {
// 如果是已知异常,则可以输出问题说明和解决方案
// TODO
}
2022-11-15 21:48:46 +08:00
$this->handle0($e);
2022-11-08 17:28:07 +08:00
}
}