Package com.alibaba.druid

Examples of com.alibaba.druid.DruidRuntimeException


        sqlObject.accept(visitor);

        Object value = getValue(sqlObject);
        if (value == null) {
            if (throwError && !sqlObject.getAttributes().containsKey(EVAL_VALUE)) {
                throw new DruidRuntimeException("eval error : " + SQLUtils.toSQLString(sqlObject, dbType));
            }
        }

        return value;
    }
View Full Code Here


        if (val instanceof Number) {
            return ((Number) val).intValue();
        }

        throw new DruidRuntimeException("cast error");
    }
View Full Code Here

        if (val instanceof String) {
            return castToDate((String) val);
        }

        throw new DruidRuntimeException("can cast to date");
    }
View Full Code Here

        }

        try {
            return new SimpleDateFormat(format).parse(text);
        } catch (ParseException e) {
            throw new DruidRuntimeException("format : " + format + ", value : " + text, e);
        }
    }
View Full Code Here

            throw new UnsupportedOperationException();
        }
        try {
            field.getField().set(object, fieldValue);
        } catch (IllegalArgumentException e) {
            throw new DruidRuntimeException("set field error" + field.getField(), e);
        } catch (IllegalAccessException e) {
            throw new DruidRuntimeException("set field error" + field.getField(), e);
        }
    }
View Full Code Here

                if (value == null) {
                    value = getConstValueFromDb(domain, app, hashField.getHashForType(), hash);
                }
                hashField.getHashFor().set(statValue, value);
            } catch (IllegalArgumentException e) {
                throw new DruidRuntimeException("set field error" + hashField.getField(), e);
            } catch (IllegalAccessException e) {
                throw new DruidRuntimeException("set field error" + hashField.getField(), e);
            }
        }
    }
View Full Code Here

                        JdbcUtils.close(conn);
                    }
                    cachePut(hashField.getHashForType(), hash, value);
                }
            } catch (IllegalArgumentException e) {
                throw new DruidRuntimeException("set field error" + hashField.getField(), e);
            } catch (IllegalAccessException e) {
                throw new DruidRuntimeException("set field error" + hashField.getField(), e);
            }
        }
    }
View Full Code Here

                paramIndex++;
            }
        } catch (RuntimeException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new DruidRuntimeException("setParam error", ex);
        }
    }
View Full Code Here

    public Object createInstance(BeanInfo beanInfo) {
        try {
            return beanInfo.getClazz().newInstance();
        } catch (InstantiationException ex) {
            throw new DruidRuntimeException("create instance error", ex);
        } catch (IllegalAccessException ex) {
            throw new DruidRuntimeException("create instance error", ex);
        }
    }
View Full Code Here

        sqlObject.accept(visitor);

        Object value = getValue(sqlObject);
        if (value == null) {
            if (throwError && !sqlObject.getAttributes().containsKey(EVAL_VALUE)) {
                throw new DruidRuntimeException("eval error : " + SQLUtils.toSQLString(sqlObject, dbType));
            }
        }

        return value;
    }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.DruidRuntimeException

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.