You are here

public function SyncException::__construct in CMS Content Sync 2.1.x

Same name and namespace in other branches
  1. 8 src/Exception/SyncException.php \Drupal\cms_content_sync\Exception\SyncException::__construct()
  2. 2.0.x src/Exception/SyncException.php \Drupal\cms_content_sync\Exception\SyncException::__construct()

SyncException constructor.

Parameters

string $errorCode: See SyncException::CODE_*

\Exception $parentException: {@see SyncException::$parentException}

string $message: Optional message to describe the error in more detail

File

src/Exception/SyncException.php, line 69

Class

SyncException
Class SyncException, thrown if anything goes wrong during pull / push of entities for Content Sync. Will be caught by the Flow synchronization class, saved to the logs, presented to the user and returned to Sync Core.

Namespace

Drupal\cms_content_sync\Exception

Code

public function __construct($errorCode, \Exception $parentException = null, $message = null) {
  parent::__construct($message ? $message : $errorCode);
  $this->errorCode = $errorCode;
  $this->parentException = $parentException;
}