protected function BrowserBase::getErrorClass in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/jcalderonzumba/gastonjs/src/Browser/BrowserBase.php \Zumba\GastonJS\Browser\BrowserBase::getErrorClass()
Parameters
$error:
Return value
1 call to BrowserBase::getErrorClass()
- BrowserBase::command in vendor/
jcalderonzumba/ gastonjs/ src/ Browser/ BrowserBase.php - Sends a command to the browser
File
- vendor/
jcalderonzumba/ gastonjs/ src/ Browser/ BrowserBase.php, line 109
Class
- BrowserBase
- Class BrowserBase @package Zumba\GastonJS\Browser
Namespace
Zumba\GastonJS\BrowserCode
protected function getErrorClass($error) {
$errorClassMap = array(
'Poltergeist.JavascriptError' => "Zumba\\GastonJS\\Exception\\JavascriptError",
'Poltergeist.FrameNotFound' => "Zumba\\GastonJS\\Exception\\FrameNotFound",
'Poltergeist.InvalidSelector' => "Zumba\\GastonJS\\Exception\\InvalidSelector",
'Poltergeist.StatusFailError' => "Zumba\\GastonJS\\Exception\\StatusFailError",
'Poltergeist.NoSuchWindowError' => "Zumba\\GastonJS\\Exception\\NoSuchWindowError",
'Poltergeist.ObsoleteNode' => "Zumba\\GastonJS\\Exception\\ObsoleteNode",
);
if (isset($error['error']['name']) && isset($errorClassMap[$error["error"]["name"]])) {
return new $errorClassMap[$error["error"]["name"]]($error);
}
return new BrowserError($error);
}