Skip to content
Snippets Groups Projects
Commit 5216be30 authored by Alberto Silva's avatar Alberto Silva
Browse files

Add better logging when a fragment can not be found

parent 0aa27aab
Branches
Tags 8.x-1.5
No related merge requests found
......@@ -93,11 +93,11 @@ class GraphQLFragmentLoader implements GraphQLFragmentLoaderInterface {
foreach ($matches[1] as $key => $match) {
$fragmentPath = realpath($baseDir . '/' . $match);
if (!$this->isFragmentPathValid($fragmentPath)) {
$this->logger->warning($this->t("Fragment path '@fragment-path' is not valid.", ['@fragment-path' => $fragmentPath]));
$this->logger->warning($this->t("Fragment path '@fragment-path' is not valid (derived from '@match').", ['@fragment-path' => $fragmentPath, '@match' => $match]));
continue;
}
if (!is_file($fragmentPath)) {
$this->logger->warning($this->t("No fragment '@fragment-path' found.", ['@fragment-path' => $fragmentPath]));
$this->logger->warning($this->t("No fragment '@fragment-path' found (derived from '@match').", ['@fragment-path' => $fragmentPath, '@match' => $match]));
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment