class JsonParseError in Janrain Registration 8
The error to throw when the data cannot be parsed as JSON.
Hierarchy
- class \Drupal\janrain_capture\Exception\JsonParseError extends \Drupal\janrain_capture\Exception\RuntimeException
Expanded class hierarchy of JsonParseError
1 file declares its use of JsonParseError
File
- src/
Exception/ JsonParseError.php, line 8
Namespace
Drupal\janrain_capture\ExceptionView source
class JsonParseError extends \RuntimeException {
/**
* The content that was tried to be recognized as valid JSON.
*
* @var string
*/
protected $content;
/**
* {@inheritdoc}
*/
public function __construct(string $content) {
parent::__construct('Error parsing JSON');
$this->content = $content;
}
/**
* {@inheritdoc}
*/
public function getContent() : string {
return $this->content;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
JsonParseError:: |
protected | property | The content that was tried to be recognized as valid JSON. | |
JsonParseError:: |
public | function | ||
JsonParseError:: |
public | function |