public function setErrorControllerClass(string $errorControllerClass): void
    {
        if (!is_a($errorControllerClass, ErrorControllerInterface::class, true)) {
            throw new InvalidControllerClassException('"' . $errorControllerClass . '" is not a valid error controller class.');
        }

        $this->errorControllerClass = $errorControllerClass;
    }