Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Exception.php
Go to the documentation of this file.
1 <?php
28 class Zend_Exception extends Exception
29 {
33  private $_previous = null;
34 
43  public function __construct($msg = '', $code = 0, Exception $previous = null)
44  {
45  if (version_compare(PHP_VERSION, '5.3.0', '<')) {
46  parent::__construct($msg, (int) $code);
47  $this->_previous = $previous;
48  } else {
49  parent::__construct($msg, (int) $code, $previous);
50  }
51  }
52 
62  public function __call($method, array $args)
63  {
64  if ('getprevious' == strtolower($method)) {
65  return $this->_getPrevious();
66  }
67  return null;
68  }
69 
75  public function __toString()
76  {
77  if (version_compare(PHP_VERSION, '5.3.0', '<')) {
78  if (null !== ($e = $this->getPrevious())) {
79  return $e->__toString()
80  . "\n\nNext "
81  . parent::__toString();
82  }
83  }
84  return parent::__toString();
85  }
86 
92  protected function _getPrevious()
93  {
94  return $this->_previous;
95  }
96 }
__call($method, array $args)
Definition: Exception.php:62
__construct($msg='', $code=0, Exception $previous=null)
Definition: Exception.php:43
$method
Definition: info.phtml:13
$code
Definition: info.phtml:12