public function __construct( protected string
$environment,
protected bool
$debug,
protected ?ClassLoader
$classLoader = null
) { } public function handle(Request
$request, int
$type = HttpKernelInterface::MAIN_REQUEST, bool
$catch = true
): HttpKernelResult
{ try { return $this->
doHandle($request,
$type,
$catch);
} catch (Exception
$e) { /** @var Params|array{url?: string} $connectionParams */
$connectionParams = self::
getConnection()->
getParams();
$message =
str_replace([$connectionParams['url'
] ?? null,
$connectionParams['password'
] ?? null,
$connectionParams['user'
] ?? null
], '******',
$e->
getMessage());
throw new \
RuntimeException(sprintf('Could not connect to database. Message from SQL Server: %s',
$message));
} } public function getKernel(): KernelInterface
{