Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ElementException.php

function ElementException::__construct

Initialises exception.

Parameters

Element $element optional message:

\Exception $exception exception:

File

vendor/behat/mink/src/Exception/ElementException.php, line 37

Class

ElementException
A standard way for elements to re-throw exceptions.

Namespace

Behat\Mink\Exception

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal