Problem/Motivation

The function services_error (file:services.runtime.inc is supposed to manage 3 parameters. The third optional according to its description :

"Information that can be used by the server to return information about the error. Defaults to null"


When inspecting services_error code :

function services_error($message, $code = 0, $data = NULL) {
  throw new ServicesException($message, $code, $data);
}

and ServicesException code :

class ServicesException extends Exception {
  private $data;
  public function __construct($message, $code = 0, $data = NULL) {
    parent::__construct($message, $code);
    $this->data = $message;
  }
  public function getData() {
    return $this->data;
  }
}

Comments

marcingy’s picture

Status: Active » Closed (duplicate)
dbechaud’s picture

Ouch ! That's true, I didn't find it... I apologize for overload.