Fix #75: throw invalid exception

This commit is contained in:
Ivan Shalganov 2014-04-09 20:00:08 +04:00
parent 8b3dd4c8a7
commit 1f9a56500e

View File

@ -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];
}