You are here

public function Twig_Error::__call in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/lib/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/twig/lib/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));
}