Package com.foundationdb.server.error

Examples of com.foundationdb.server.error.InvalidParameterValueException


                    value = "DELAYED" + value.substring(8);
                try {
                    checkTime = FDBPendingIndexChecks.CheckTime.valueOf(value);
                }
                catch (IllegalArgumentException ex) {
                    throw new InvalidParameterValueException(ex.getMessage());
                }
            }
            session.put(CONSTRAINT_CHECK_TIME_KEY, checkTime);
            break;
        }
View Full Code Here


            Group group = context.getStore().schema().ais().getGroup(groupName);
            if (group == null)
                throw new NoSuchGroupException(groupName);
            StorageDescription storage = group.getStorageDescription();
            if (!(storage instanceof ProtobufStorageDescription))
                throw new InvalidParameterValueException("group does not use STORAGE_FORMAT protobuf");
            FileDescriptorProto fileProto = ((ProtobufStorageDescription)storage).getFileProto();
            try {
                tempFile = File.createTempFile("group", ".proto");
                try (FileWriter writer = new FileWriter(tempFile)) {
                    new ProtobufDecompiler(writer).decompile(fileProto);
View Full Code Here

        char c      = '\"';
        boolean b   = false;

        if( s.isEmpty() )
        {
            throw new InvalidParameterValueException("Empty identifier");
        }

        if( covering.length >= 2) {
            String arg2 = inputs.get(1).getString();

            if (arg2.length() == 1) {
                c = arg2.charAt(0);
            }
            else {
                throw new InvalidParameterValueException(("one character as quote allowed"));
            }
        }

        if ( covering.length == 3) {
            b = inputs.get(2).getBoolean();
View Full Code Here

        int val = inputs.get(0).getInt32();
        long ymd[] = decoder.decode(val);
        int ret;
        if (ymd == null || (ret = getField(ymd, context)) < 0)
        {
            context.warnClient(new InvalidParameterValueException("Invalid DATETIME value: " + val));
            output.putNull();
        }
        else
            output.putInt32(ret);
    }
View Full Code Here

            public void cacheToValue(Object bdw, TInstance type, BasicValueTarget target) {
                if (bdw instanceof UUID) {
                    byte[] bb = uuidToBytes((UUID)bdw);
                    target.putBytes(bb);                   
                } else {
                    throw new InvalidParameterValueException("cannot perform UUID cast on Object");
                }
            }
View Full Code Here

            char esca = '\\';
            if (inputs.size() == 3)
            {
                String escapeString = inputs.get(2).getString();
                if (escapeString.length() != 1)
                    throw new InvalidParameterValueException("Invalid escape character: " + escapeString);
                esca = escapeString.charAt(0);
            }

            // Get the cached matcher from execute time.
            matcher = (Matcher) context.exectimeObjectAt(MATCHER_INDEX);
View Full Code Here

        int lower = c | 32;
        if(lower >= '0' && lower <= '9')
            return lower - '0';
        if(lower >= 'a' && lower <= 'f')
            return 10 + lower - 'a';
        throw new InvalidParameterValueException("Invalid HEX digit: " + c);
    }
View Full Code Here

            String[] featureNames = featuresStr.split(",");
            for(String f : featureNames) {
                try {
                    features.add(SQLParserFeature.valueOf(f));
                } catch(IllegalArgumentException e) {
                    throw new InvalidParameterValueException("'" + f + "' for " + CONFIG_PARSER_FEATURES);
                }
            }
        }
        if (getBooleanProperty("parserInfixBit", false)) {
            features.add(SQLParserFeature.INFIX_BIT_OPERATORS);
        }
        if (getBooleanProperty("parserInfixLogical", false)) {
            features.add(SQLParserFeature.INFIX_LOGICAL_OPERATORS);
        }
        if (getBooleanProperty("columnAsFunc", false)) {
            features.add(SQLParserFeature.MYSQL_COLUMN_AS_FUNCS);
        }
        String prop = getProperty("parserDoubleQuoted", "identifier");
        if (prop.equals("string")) {
            features.add(SQLParserFeature.DOUBLE_QUOTED_STRING);
        } else if (!prop.equals("identifier")) {
            throw new InvalidParameterValueException("'" + prop + "' for parserDoubleQuoted");
        }
        return features;
    }
View Full Code Here

        if (prop.equalsIgnoreCase("true"))
            return true;
        else if (prop.equalsIgnoreCase("false"))
            return false;
        else
            throw new InvalidParameterValueException("'" + prop + "' for " + key);
    }
View Full Code Here

                    byte[] binary = string.getBytes(charset);
                    output.putString(Strings.toBase64(binary), null);
                }
                catch (UnsupportedEncodingException ex)
                {
                    context.warnClient(new InvalidParameterValueException("Unknown CHARSET: " + charset));
                    output.putNull();
                }
            }
        };
View Full Code Here

TOP

Related Classes of com.foundationdb.server.error.InvalidParameterValueException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.