/** * @param \Exception $oException * @param int $iDescType = \MailSo\Log\Enumerations\Type::NOTICE * @param bool $bThrowException = false * * @return void */ protected function writeLogException($oException, $iDescType = \MailSo\Log\Enumerations\Type::NOTICE, $bThrowException = false) { if ($this->oLogger) { if ($oException instanceof Exceptions\SocketCanNotConnectToHostException) { $this->oLogger->Write('Socket: [' . $oException->getSocketCode() . '] ' . $oException->getSocketMessage(), $iDescType, $this->getLogName()); } $this->oLogger->WriteException($oException, $iDescType, $this->getLogName()); } if ($bThrowException) { throw $oException; } }