mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Fix #75: throw invalid exception
This commit is contained in:
parent
8b3dd4c8a7
commit
1f9a56500e
@ -9,7 +9,6 @@
|
|||||||
*/
|
*/
|
||||||
namespace Fenom;
|
namespace Fenom;
|
||||||
use Fenom;
|
use Fenom;
|
||||||
use Symfony\Component\Yaml\Exception\RuntimeException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primitive template
|
* Primitive template
|
||||||
@ -194,13 +193,14 @@ class Render extends \ArrayObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get internal macro
|
* Get internal macro
|
||||||
* @param $name
|
* @param string $name
|
||||||
* @return mixed
|
* @throws \RuntimeException
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getMacro($name)
|
public function getMacro($name)
|
||||||
{
|
{
|
||||||
if (empty($this->_macros[$name])) {
|
if (empty($this->_macros[$name])) {
|
||||||
throw new RuntimeException('macro not found');
|
throw new \RuntimeException('macro '.$name.' not found');
|
||||||
}
|
}
|
||||||
return $this->_macros[$name];
|
return $this->_macros[$name];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user