class ElementException in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/Exception/ElementException.php \Behat\Mink\Exception\ElementException
A standard way for elements to re-throw exceptions.
@author Chris Worfolk <xmeltrut@gmail.com>
Hierarchy
- class \Behat\Mink\Exception\Exception
- class \Behat\Mink\Exception\Exception
- class \Behat\Mink\Exception\ElementException
- class \Behat\Mink\Exception\Exception
Expanded class hierarchy of ElementException
Deprecated
This exception class is not used anymore in Mink 1.6 and will be removed in 2.0
1 file declares its use of ElementException
- ElementExceptionTest.php in vendor/
behat/ mink/ tests/ Exception/ ElementExceptionTest.php
File
- vendor/
behat/ mink/ src/ Exception/ ElementException.php, line 24
Namespace
Behat\Mink\ExceptionView source
class ElementException extends Exception {
private $element;
/**
* Initialises exception.
*
* @param Element $element optional message
* @param \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()));
}
/**
* Override default toString so we don't send a full backtrace in verbose mode.
*
* @return string
*/
public function __toString() {
return $this
->getMessage();
}
/**
* Get the element that caused the exception.
*
* @return Element
*/
public function getElement() {
return $this->element;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ElementException:: |
private | property | ||
ElementException:: |
public | function | Get the element that caused the exception. | |
ElementException:: |
public | function | Initialises exception. | |
ElementException:: |
public | function | Override default toString so we don't send a full backtrace in verbose mode. |