Throw a Mustachey runtime exception from filesystem source.

Fixes #370
This commit is contained in:
Justin Hileman
2021-04-28 10:25:13 -07:00
parent d2503c7a29
commit 799c0f40fd
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ class Mustache_Source_FilesystemSource implements Mustache_Source
/**
* Get the Source key (used to generate the compiled class name).
*
* @throws RuntimeException when a source file cannot be read
* @throws Mustache_Exception_RuntimeException when a source file cannot be read
*
* @return string
*/
@@ -54,7 +54,7 @@ class Mustache_Source_FilesystemSource implements Mustache_Source
}
if ($this->stat === false) {
throw new RuntimeException(sprintf('Failed to read source file "%s".', $this->fileName));
throw new Mustache_Exception_RuntimeException(sprintf('Failed to read source file "%s".', $this->fileName));
}
foreach ($this->statProps as $prop) {
@@ -15,7 +15,7 @@
class Mustache_Test_Source_FilesystemSourceTest extends PHPUnit_Framework_TestCase
{
/**
* @expectedException RuntimeException
* @expectedException Mustache_Exception_RuntimeException
*/
public function testMissingTemplateThrowsException()
{