getCode(); $this->code = $oException->getCode(); $aContext['mysql_error'] = $oException->getMessage(); } elseif ($oMysqli != null) { $aContext['mysql_errno'] = $oMysqli->errno; $this->code = $oMysqli->errno; $aContext['mysql_error'] = $oMysqli->error; } else { $aContext['mysql_errno'] = CMDBSource::GetErrNo(); $this->code = CMDBSource::GetErrNo(); $aContext['mysql_error'] = CMDBSource::GetError(); } parent::__construct($sIssue, $aContext); //if is connection error, don't log the default message with password in if (mysqli_connect_errno()) { error_log($this->message); error_reporting(0); } } }