src/Common/Json.php
private static function catchError()
    {
        switch (json_last_error()) {
            case JSON_ERROR_NONE:
                self::$error = false;
                break;
            case JSON_ERROR_DEPTH:
                self::$error = 'Maximum stack depth exceeded';
                break;
            case JSON_ERROR_STATE_MISMATCH:
                self::$error = 'Underflow or the modes mismatch';
                break;
            case JSON_ERROR_CTRL_CHAR:
                self::$error = 'Unexpected control character found';
                break;
            case JSON_ERROR_SYNTAX:
                self::$error = 'Syntax error, malformed JSON';
                break;
            case JSON_ERROR_UTF8:
                self::$error = 'Malformed UTF-8 characters, possibly incorrectly encoded';
                break;
            default:
                self::$error = 'Unknown error';
                break;
        }
    }
private static function catchError()
    {
        switch (json_last_error()) {
            case JSON_ERROR_NONE:
                self::$error = false;
                break;
            case JSON_ERROR_DEPTH:
                self::$error = 'Maximum stack depth exceeded';
                break;
            case JSON_ERROR_STATE_MISMATCH:
                self::$error = 'Underflow or the modes mismatch';
                break;
            case JSON_ERROR_CTRL_CHAR:
                self::$error = 'Unexpected control character found';
                break;
            case JSON_ERROR_SYNTAX:
                self::$error = 'Syntax error, malformed JSON';
                break;
            case JSON_ERROR_UTF8:
                self::$error = 'Malformed UTF-8 characters, possibly incorrectly encoded';
                break;
            default:
                self::$error = 'Unknown error';
                break;
        }
    }
private static function catchError ( ) { switch ( json_last_error ( ) ) { case JSON_ERROR_NONE : self :: $ error = false ; break ; case JSON_ERROR_DEPTH : self :: $ error = 'Maximum stack depth exceeded' ; break ; case JSON_ERROR_STATE_MISMATCH : self :: $ error = 'Underflow or the modes mismatch' ; break ; case JSON_ERROR_CTRL_CHAR : self :: $ error = 'Unexpected control character found' ; break ; case JSON_ERROR_SYNTAX : self :: $ error = 'Syntax error, malformed JSON' ; break ; case JSON_ERROR_UTF8 : self :: $ error = 'Malformed UTF-8 characters, possibly incorrectly encoded' ; break ; default : self :: $ error = 'Unknown error' ; break ; } }
Catch error if it occurs

@author Edson B S Monteiro <bruno.monteirodg@gmail.com>
@since 1.0
Catch error if it occurs