PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / trunk
Secure Custom Fields vtrunk
6.9.1 6.9.0 6.8.9 6.8.7 6.8.8 6.8.6 6.8.4 6.8.5 trunk 6.4.0-beta1 6.4.0-beta2 6.4.1 6.4.1-beta3 6.4.1-beta4 6.4.1-beta5 6.4.1-beta6 6.4.1-beta7 6.4.2 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.6.0 6.7.0 6.7.1 6.8.0 6.8.1 6.8.2 6.8.3
secure-custom-fields / vendor / justinrainbow / json-schema / src / JsonSchema / Exception / JsonDecodingException.php
secure-custom-fields / vendor / justinrainbow / json-schema / src / JsonSchema / Exception Last commit date
ExceptionInterface.php 7 months ago InvalidArgumentException.php 7 months ago InvalidConfigException.php 7 months ago InvalidSchemaException.php 7 months ago InvalidSchemaMediaTypeException.php 7 months ago InvalidSourceUriException.php 7 months ago JsonDecodingException.php 7 months ago ResourceNotFoundException.php 7 months ago RuntimeException.php 7 months ago UnresolvableJsonPointerException.php 7 months ago UriResolverException.php 7 months ago ValidationException.php 7 months ago
JsonDecodingException.php
41 lines
1 <?php
2
3 /*
4 * This file is part of the JsonSchema package.
5 *
6 * For the full copyright and license information, please view the LICENSE
7 * file that was distributed with this source code.
8 */
9
10 namespace JsonSchema\Exception;
11
12 /**
13 * Wrapper for the JsonDecodingException
14 */
15 class JsonDecodingException extends RuntimeException
16 {
17 public function __construct($code = JSON_ERROR_NONE, ?\Exception $previous = null)
18 {
19 switch ($code) {
20 case JSON_ERROR_DEPTH:
21 $message = 'The maximum stack depth has been exceeded';
22 break;
23 case JSON_ERROR_STATE_MISMATCH:
24 $message = 'Invalid or malformed JSON';
25 break;
26 case JSON_ERROR_CTRL_CHAR:
27 $message = 'Control character error, possibly incorrectly encoded';
28 break;
29 case JSON_ERROR_UTF8:
30 $message = 'Malformed UTF-8 characters, possibly incorrectly encoded';
31 break;
32 case JSON_ERROR_SYNTAX:
33 $message = 'JSON syntax is malformed';
34 break;
35 default:
36 $message = 'Syntax error';
37 }
38 parent::__construct($message, $code, $previous);
39 }
40 }
41