1010 * @license https://opensource.org/licenses/MIT - The MIT License (MIT)
1111 * @version 1.0.0
1212 * @link https://github.com/Josantonius/PHP-Json
13- * @since File available since 1.0.0 - Update: 2016-12-14
13+ * @since File available since 1.0.0 - Update: 2016-12-19
1414 */
1515
1616namespace Josantonius \Json ;
@@ -77,7 +77,7 @@ public static function fileToArray(string $pathfile): array {
7777 return $ jsonArray ;
7878 }
7979
80- throw new JsonException ('File not found in ' . $ pathfile , 300 );
80+ throw new JsonException ('File not found in ' . $ pathfile , 605 );
8181 }
8282
8383 /**
@@ -93,17 +93,17 @@ public static function jsonLastError() {
9393 case JSON_ERROR_NONE :
9494 return true ;
9595 case JSON_ERROR_UTF8 :
96- throw new JsonException ('Malformed UTF-8 characters ' , 300 );
96+ throw new JsonException ('Malformed UTF-8 characters ' , 606 );
9797 case JSON_ERROR_DEPTH :
98- throw new JsonException ('Maximum stack depth exceeded ' , 300 );
98+ throw new JsonException ('Maximum stack depth exceeded ' , 607 );
9999 case JSON_ERROR_SYNTAX :
100- throw new JsonException ('Syntax error, malformed JSON ' , 300 );
100+ throw new JsonException ('Syntax error, malformed JSON ' , 608 );
101101 case JSON_ERROR_CTRL_CHAR :
102- throw new JsonException ('Unexpected control char found ' , 300 );
102+ throw new JsonException ('Unexpected control char found ' , 609 );
103103 case JSON_ERROR_STATE_MISMATCH :
104- throw new JsonException ('Underflow or the modes mismatch ' , 300 );
104+ throw new JsonException ('Underflow or the modes mismatch ' , 610 );
105105 default :
106- throw new JsonException ('Unknown error ' , 300 );
106+ throw new JsonException ('Unknown error ' , 995 );
107107 }
108108 }
109109}
0 commit comments