Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
Zend_Exception Class Reference
Inheritance diagram for Zend_Exception:
Zend_Acl_Exception Zend_Cache_Exception Zend_Config_Exception Zend_Console_Getopt_Exception Zend_Crypt_Exception Zend_Currency_Exception Zend_Date_Exception Zend_Db_Exception Zend_File_Transfer_Exception Zend_Filter_Exception Zend_Http_Exception Zend_Http_UserAgent_Exception Zend_Json_Exception Zend_Loader_Exception Zend_Locale_Exception Zend_Log_Exception Zend_Mail_Exception Zend_Measure_Exception Zend_Memory_Exception Zend_Mime_Exception Zend_Oauth_Exception Zend_Pdf_Exception Zend_ProgressBar_Exception Zend_Server_Exception Zend_Session_Exception Zend_Soap_AutoDiscover_Exception Zend_Soap_Client_Exception Zend_Soap_Server_Exception Zend_Soap_Wsdl_Exception Zend_Text_Exception Zend_TimeSync_Exception Zend_Translate_Exception Zend_Uri_Exception Zend_Validate_Exception Zend_Xml_Exception

Public Member Functions

 __construct ($msg='', $code=0, Exception $previous=null)
 
 __call ($method, array $args)
 
 __toString ()
 

Protected Member Functions

 _getPrevious ()
 

Detailed Description

Definition at line 28 of file Exception.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $msg = '',
  $code = 0,
Exception  $previous = null 
)

Construct the exception

Parameters
string$msg
int$code
Exception$previous
Returns
void

Definition at line 43 of file Exception.php.

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  }
$code
Definition: info.phtml:12

Member Function Documentation

◆ __call()

__call (   $method,
array  $args 
)

Overloading

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

Parameters
string$method
array$args
Returns
mixed

Definition at line 62 of file Exception.php.

63  {
64  if ('getprevious' == strtolower($method)) {
65  return $this->_getPrevious();
66  }
67  return null;
68  }
$method
Definition: info.phtml:13

◆ __toString()

__toString ( )

String representation of the exception

Returns
string

Definition at line 75 of file Exception.php.

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  }

◆ _getPrevious()

_getPrevious ( )
protected

Returns previous Exception

Returns
Exception|null

Definition at line 92 of file Exception.php.

93  {
94  return $this->_previous;
95  }

The documentation for this class was generated from the following file: