Chris@0: message = $this->message(); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Gets the name of the browser error Chris@0: * @return string Chris@0: */ Chris@0: public function getName() { Chris@0: return $this->response["error"]["name"]; Chris@0: } Chris@0: Chris@0: /** Chris@0: * @return JSErrorItem Chris@0: */ Chris@0: public function javascriptError() { Chris@0: //TODO: this need to be check, i don't know yet what comes in response Chris@0: return new JSErrorItem($this->response["error"]["args"][0], $this->response["error"]["args"][1]); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Returns error message Chris@0: * TODO: check how to proper implement if we have exceptions Chris@0: * @return string Chris@0: */ Chris@0: public function message() { Chris@0: return "There was an error inside the PhantomJS portion of GastonJS.\nThis is probably a bug, so please report it:\n" . $this->javascriptError(); Chris@0: } Chris@0: }