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;
|
||||
use Fenom;
|
||||
use Symfony\Component\Yaml\Exception\RuntimeException;
|
||||
|
||||
/**
|
||||
* Primitive template
|
||||
@ -194,13 +193,14 @@ class Render extends \ArrayObject
|
||||
|
||||
/**
|
||||
* Get internal macro
|
||||
* @param $name
|
||||
* @return mixed
|
||||
* @param string $name
|
||||
* @throws \RuntimeException
|
||||
* @return array
|
||||
*/
|
||||
public function getMacro($name)
|
||||
{
|
||||
if (empty($this->_macros[$name])) {
|
||||
throw new RuntimeException('macro not found');
|
||||
throw new \RuntimeException('macro '.$name.' not found');
|
||||
}
|
||||
return $this->_macros[$name];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user