You are here

public function Twig_Error::__call in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Error.php \Twig_Error::__call()

For PHP < 5.3.0, provides access to the getPrevious() method.

Parameters

string $method The method name:

array $arguments The parameters to be passed to the method:

Return value

Exception The previous exception or null

Throws

BadMethodCallException

File

vendor/Twig/Error.php, line 149

Class

Twig_Error
Twig base exception.

Code

public function __call($method, $arguments) {
  if ('getprevious' == strtolower($method)) {
    return $this->previous;
  }
  throw new BadMethodCallException(sprintf('Method "Twig_Error::%s()" does not exist.', $method));
}