/**
* For PHP < 5.3.0, provides access to the getPrevious() method.
*
- * @param string $method The method name
- * @param array $args The parameters to be passed to the method
+ * @param string $method The method name
+ * @param array $arguments The parameters to be passed to the method
*
* @return Exception The previous exception or null
*/
- public function __call($method, array $args)
+ public function __call($method, $arguments)
{
if ('getprevious' == strtolower($method)) {
return $this->previous;
}
- return null;
+
+ throw new BadMethodCallException(sprintf('Method "Twig_Error::%s()" does not exist.', $method));
}
protected function updateRepr()