modify plugin name

This commit is contained in:
2022-06-22 16:57:11 +08:00
parent f595f1146e
commit 8630d79519
2 changed files with 42 additions and 5 deletions
+17
View File
@@ -23,6 +23,8 @@ use Symfony\Component\Console\{Application as ConsoleApplication,
Output\OutputInterface
};
use Kiri\Di\LocalService;
use Kiri\Exception\ConfigException;
use Kiri\Error\ErrorHandler;
/**
@@ -43,6 +45,21 @@ class Main extends BaseMain
public string $state = '';
/**
* @return void
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws ConfigException
*/
public function init(): void
{
$error = $this->container->get(ErrorHandler::class);
$error->registerShutdownHandler(Config::get('error.shutdown', []));
$error->registerExceptionHandler(Config::get('error.exception', []));
$error->registerErrorHandler(Config::get('error.error', []));
}
/**
* @param string $service
* @return $this