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