DataEncodingException
extends Exception
in package
Exception thrown when data can not be converted to a specified format.
Table of Contents
Constants
- JSON_ENCODING_FAILED = 'Failed to encode data as JSON'
Methods
- __construct() : mixed
- Create a new DataEncodingException.
- __toString() : string
- String representation of the exception.
Constants
JSON_ENCODING_FAILED
public
final mixed
JSON_ENCODING_FAILED
= 'Failed to encode data as JSON'
Methods
__construct()
Create a new DataEncodingException.
public
__construct(string $error) : mixed
Parameters
- $error : string
-
The error message.
__toString()
String representation of the exception.
public
__toString() : string
Return values
string —String representation of the exception.