class BrowserError in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/jcalderonzumba/gastonjs/src/Exception/BrowserError.php \Zumba\GastonJS\Exception\BrowserError
Class BrowserError @package Zumba\GastonJS\Exception
Hierarchy
- class \Zumba\GastonJS\Exception\ClientError extends \Zumba\GastonJS\Exception\Exception
- class \Zumba\GastonJS\Exception\BrowserError
Expanded class hierarchy of BrowserError
2 files declare their use of BrowserError
- BrowserBase.php in vendor/
jcalderonzumba/ gastonjs/ src/ Browser/ BrowserBase.php - BrowserNavigateTrait.php in vendor/
jcalderonzumba/ gastonjs/ src/ Browser/ BrowserNavigateTrait.php
File
- vendor/
jcalderonzumba/ gastonjs/ src/ Exception/ BrowserError.php, line 10
Namespace
Zumba\GastonJS\ExceptionView source
class BrowserError extends ClientError {
/**
* @param array $response
*/
public function __construct($response) {
parent::__construct($response);
$this->message = $this
->message();
}
/**
* Gets the name of the browser error
* @return string
*/
public function getName() {
return $this->response["error"]["name"];
}
/**
* @return JSErrorItem
*/
public function javascriptError() {
//TODO: this need to be check, i don't know yet what comes in response
return new JSErrorItem($this->response["error"]["args"][0], $this->response["error"]["args"][1]);
}
/**
* Returns error message
* TODO: check how to proper implement if we have exceptions
* @return string
*/
public function message() {
return "There was an error inside the PhantomJS portion of GastonJS.\nThis is probably a bug, so please report it:\n" . $this
->javascriptError();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BrowserError:: |
public | function | Gets the name of the browser error | |
BrowserError:: |
public | function | ||
BrowserError:: |
public | function | Returns error message TODO: check how to proper implement if we have exceptions | |
BrowserError:: |
public | function |
Overrides ClientError:: |
|
ClientError:: |
protected | property | @var mixed | |
ClientError:: |
public | function | ||
ClientError:: |
public | function |