You are here

public static function Error::parseError in JSON-RPC 2.x

Same name and namespace in other branches
  1. 8 src/Object/Error.php \Drupal\jsonrpc\Object\Error::parseError()

Constructs a new parse error.

Parameters

mixed $data: More specific information about the error.

Return value

static

File

src/Object/Error.php, line 133

Class

Error
Error class to help implement JSON RPC's spec for errors.

Namespace

Drupal\jsonrpc\Object

Code

public static function parseError($data = NULL) {
  return new static(static::PARSE_ERROR, static::$errorMessages[static::PARSE_ERROR], $data ?: static::$errorMeanings[static::PARSE_ERROR]);
}