Package com.foundationdb.server.error

Examples of com.foundationdb.server.error.InvalidParameterValueException


        double dVar = val.asBigDecimal().doubleValue();
       
        if (Double.compare(dVar, min) >= 0 && Double.compare(dVar, max) <= 0)
            return dVar;
        else
            throw new InvalidParameterValueException(String.format("Value out of range[%f, %f]: %f ", min, max, dVar));
    }
View Full Code Here


            try {
                byte[] bytes = str.substring(0, 1).getBytes(charset);
                output.putInt32(bytes[0] & 0xFF);
            }
            catch (UnsupportedEncodingException ex) {
                context.warnClient(new InvalidParameterValueException("Invalid charset: " + charset));
                output.putNull();
            }
        }
    }
View Full Code Here

                length *= multiplier;
                output.putInt32(length);
            }
            catch (UnsupportedEncodingException ex) // impossible to happen
            {
                context.warnClient(new InvalidParameterValueException("Unknown CHARSET: " + charset));
                output.putNull();
            }
        }
View Full Code Here

            newEncoding = newEncoding.substring(1, newEncoding.length()-1);
        try {
            Charset.forName(newEncoding);
        }
        catch (IllegalArgumentException ex) {
            throw new InvalidParameterValueException("unknown client_encoding '" +
                                                     encoding + "'");
        }
        this.encoding = newEncoding;
    }
View Full Code Here

        @Override
        public NewAISGroupIndexStarter groupIndex(String indexName, Index.JoinType joinType) {
            ActualGroupIndexBuilder actual  = new ActualGroupIndexBuilder(aisb, defaultSchema);
            if (joinType == null) {
                throw new InvalidParameterValueException("JoinType cannot be null");
            }
            return actual.groupIndex(indexName, joinType);
        }
View Full Code Here

                case 'x': flags |= Pattern.COMMENTS; break;
                // And pick a letters for remaining flags
                case 'l': flags |= Pattern.LITERAL; break;
                case 'c': flags |= Pattern.CANON_EQ; break;
                default:
                    throw new InvalidParameterValueException("Invalid option: " + opts.charAt(i));
            }
        }
        return flags;
    }
View Full Code Here

                                                keyLength,
                                                mode));
        }
        catch (Exception e)
        {
            context.warnClient(new InvalidParameterValueException(e.getMessage()));
            output.putNull();
        }
    }
View Full Code Here

    private static Object[] computeResult(long ymd[], String format, String tz)
    {
        String st = null;
        InvalidOperationException error = null;
        if (ymd == null || MDateAndTime.isZeroDayMonth(ymd))
            error = new InvalidParameterValueException("Incorrect datetime value");
        else
            try
            {
                st = DateTimeField.getFormatted(MDateAndTime.toJodaDateTime(ymd, tz),
                                                format);
View Full Code Here

    public void reportBadValue(String msg)
    {
        switch(invalidFormatHandling)
        {
            case WARN:
                warnClient(new InvalidParameterValueException(msg));
                break;
            case ERROR:
                throw new InvalidParameterValueException(msg);
            case IGNORE:
                // ignores, does nothing
                break;
            default:
                throw new AssertionError(invalidFormatHandling);
View Full Code Here

    private static void checkEndEscape(String pattern, char escape) {
        int len = pattern.length();
        if(pattern.charAt(len - 1) == escape) {
            if(((len - 2) < 0) || (pattern.charAt(len - 2) != escape)) {
                throw new InvalidParameterValueException("Illegal escape sequence");
            }
        }
    }
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.