}
if ($step->splitNode()) {
- $this->logInstallationStep($data, 'split node');
+ $log = 'split node';
+ if ($step->getException() !== null && $step->getException()->getMessage()) {
+ $log .= ': ' . $step->getException()->getMessage();
+ }
+
+ $this->logInstallationStep($data, $log);
$this->nodeBuilder->cloneNode($node, $data['sequenceNo']);
break;
}
$document = $plugin->{$this->action}();
}
catch (SplitNodeException $e) {
- $step->setSplitNode();
+ $step->setSplitNode($e);
}
if ($document !== null && ($document instanceof FormDocument)) {
*/
protected $document = null;
+ /**
+ * exception causing node splitting
+ * @var null|SplitNodeException
+ */
+ protected $exception;
+
/**
* next installation node
* @var string
$this->document = $document;
}
+ /**
+ * Returns the exception causing node splitting or `null` if the node has not been split
+ * or if it was not split by an exception.
+ *
+ * @return null|SplitNodeException
+ */
+ public function getException() {
+ return $this->exception;
+ }
+
/**
* Returns HTML-representation of form document object.
*
/**
* Enforces node splitting.
+ *
+ * @param null|SplitNodeException $splitNodeException
*/
- public function setSplitNode() {
+ public function setSplitNode(SplitNodeException $splitNodeException = null) {
$this->splitNode = true;
+ $this->exception = $splitNodeException;
}
/**