Extract register error handler into separate method

This commit is contained in:
Art4 2024-12-23 15:30:42 +00:00
parent 3c4da64348
commit 7d10d04768

View file

@ -123,6 +123,8 @@ class App
{ {
$this->setupContainerForRunningFrontend($request); $this->setupContainerForRunningFrontend($request);
$this->registerErrorHandler();
$this->requestId = $this->container->create(Request::class)->getRequestId(); $this->requestId = $this->container->create(Request::class)->getRequestId();
$this->auth = $this->container->create(Authentication::class); $this->auth = $this->container->create(Authentication::class);
$this->config = $this->container->create(IManageConfigValues::class); $this->config = $this->container->create(IManageConfigValues::class);
@ -167,7 +169,10 @@ class App
]); ]);
\Friendica\DI::init($this->container); \Friendica\DI::init($this->container);
}
private function registerErrorHandler(): void
{
\Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(LoggerInterface::class)); \Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(LoggerInterface::class));
} }