Specify MDJsonEncodingFailedException for failure to encode JSON through
MD_STD::json_encode
This commit is contained in:
@ -242,7 +242,7 @@ final class MD_STD {
|
||||
|
||||
$output = \json_encode($value, $options, $depth);
|
||||
if ($output === false) {
|
||||
throw new Exception("JSON output could not be generated");
|
||||
throw new MDJsonEncodingFailedException("JSON output could not be generated");
|
||||
}
|
||||
return $output;
|
||||
|
||||
@ -263,7 +263,7 @@ final class MD_STD {
|
||||
|
||||
$output = \json_encode($value, $options, $depth);
|
||||
if ($output === false) {
|
||||
throw new Exception("JSON output could not be generated");
|
||||
throw new MDJsonEncodingFailedException("JSON output could not be generated");
|
||||
}
|
||||
return $output;
|
||||
|
||||
|
Reference in New Issue
Block a user