Skip to content

Commit 45a69c2

Browse files
Fix exception messages containing exception messages
1 parent 264208f commit 45a69c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Templating/Loader/TemplateLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function locate($template, $currentPath = null, $first = true)
7979
try {
8080
return $this->cacheHits[$key] = $this->locator->locate($template->getPath(), $currentPath);
8181
} catch (\InvalidArgumentException $e) {
82-
throw new \InvalidArgumentException(sprintf('Unable to find template "%s" : "%s".', $template, $e->getMessage()), 0, $e);
82+
throw new \InvalidArgumentException(sprintf('Unable to find template "%s": ', $template).$e->getMessage(), 0, $e);
8383
}
8484
}
8585
}

Tests/Functional/CachePoolsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testRedisCachePools()
4040
}
4141
$this->markTestSkipped($e->getMessage());
4242
} catch (InvalidArgumentException $e) {
43-
if (0 !== strpos($e->getMessage(), 'Redis connection failed')) {
43+
if (0 !== strpos($e->getMessage(), 'Redis connection ')) {
4444
throw $e;
4545
}
4646
$this->markTestSkipped($e->getMessage());

0 commit comments

Comments
 (0)