Initialises exception.
Element $element optional message:
\Exception $exception exception:
public function __construct(Element $element, \Exception $exception) { $this->element = $element; parent::__construct(sprintf("Exception thrown by %s\n%s", $element->getXpath(), $exception->getMessage())); }