Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Zend_Db_Statement_Sqlsrv_Exception Class Reference
Inheritance diagram for Zend_Db_Statement_Sqlsrv_Exception:
Zend_Db_Statement_Exception Zend_Db_Exception Zend_Exception

Public Member Functions

 __construct ($message=null, $code=0)
 
- Public Member Functions inherited from Zend_Db_Statement_Exception
 hasChainedException ()
 
 getChainedException ()
 
- Public Member Functions inherited from Zend_Exception
 __construct ($msg='', $code=0, Exception $previous=null)
 
 __call ($method, array $args)
 
 __toString ()
 

Additional Inherited Members

- Protected Member Functions inherited from Zend_Exception
 _getPrevious ()
 

Detailed Description

Definition at line 34 of file Exception.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $message = null,
  $code = 0 
)

Constructor

If $message is an array, the assumption is that the return value of sqlsrv_errors() was provided. If so, it then retrieves the most recent error from that stack, and sets the message and code based on it.

Parameters
null | array | string$message
null | int$code

Definition at line 46 of file Exception.php.

47  {
48  if (is_array($message)) {
49  // Error should be array of errors
50  // We only need first one (?)
51  if (isset($message[0])) {
52  $message = $message[0];
53  }
54 
55  $code = (int) $message['code'];
56  $message = (string) $message['message'];
57  }
58  parent::__construct($message, $code);
59  }
$message
$code
Definition: info.phtml:12

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