Specify MDJsonEncodingFailedException for failure to encode JSON through

MD_STD::json_encode
This commit is contained in:
2021-11-26 03:23:07 +01:00
parent 8f5174e90d
commit 86c8235dae
2 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,19 @@
<?PHP
declare(strict_types = 1);
/**
* Reports a failure to encode JSON data.
*/
final class MDJsonEncodingFailedException extends Exception {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
$errorMsg = 'Failed to encode JSON data.';
return $errorMsg;
}
}