/** * addErrorFromQueryResponse * * @desc Pass a query response and error message container to this method: * if the query response indicates a query error, displays an error message * in the specified page element. If the query response is null, the method * will throw a Javascript error. Pass your QueryResponse received in your * query handler to this message to display an error. <br/> * It will also set the style of the display appropriate to the type (error * or warning, similar to addError(opt_options.type))<br/><br/> * <b>container</b> - The DOM element into which to insert the error message. * If the container cannot be found, the function will throw a JavaScript * error.<br/> * <b>response</b> - A QueryResponse object received by your query handler in * response to a query. If this is null, the method will throw a Javascript * error.<br/><br/> * * @param Google_Container $container * @param Google_Data_QueryResponse $response * @return string String ID value that identifies the error object created, * or null if the response didn't indicate an error. <br/> * This is a unique value on the page, and can be used to remove the error * or find its containing element.<br/> */ public function addErrorFromQueryResponse($container, $response) { $this->numOfArg = 2; $signature = array(); if (!$container instanceof Google_Container) { throw new InvalidArgumentException("expecting an instance of Google_Container"); } $signature[] = $container->getErrorContainer(); if (!$response instanceof Google_Data_QueryResponse) { throw new InvalidArgumentException("expecting an instance of Google_Data_QueryResponse"); } $signature[] = $response->getResponse(); $this->signature = array(); $this->signature = $signature; }