Package com.carmanconsulting.cassidy.exception

Examples of com.carmanconsulting.cassidy.exception.CassidyException


        for (String expression : expressions) {
            try {
                values.add(new IndexValue<>(Ognl.getValue(expression, item)));
            }
            catch (OgnlException e) {
                throw new CassidyException(String.format("Unable to evaluate OGNL expression %s", expression), e);
            }
        }
        return values;
    }
View Full Code Here


    public Class<?> resolveClass(String className) {
        try {
            return Class.forName(className);
        }
        catch (ClassNotFoundException e) {
            throw new CassidyException(String.format("Unable to resolve class %s.", e));
        }
    }
View Full Code Here

            cluster.addColumnFamily(definition, true);
            LOGGER.info("Column family {}:{} created successfully.", definition.getKeyspaceName(), definition.getName());
        }
        catch (HInvalidRequestException e) {
            LOGGER.warn("Unable to create column family {}:{}!", definition.getKeyspaceName(), definition.getName(), e);
            throw new CassidyException(String.format("Unable to create column family %s:%s!", definition.getKeyspaceName(), definition.getName()), e);
        }
    }
View Full Code Here

    public static Object getFieldValue(Object target, String fieldName) {
        try {
            return FieldUtils.readField(target, fieldName, true);
        }
        catch (IllegalAccessException e) {
            throw new CassidyException(String.format("Unable to read field %s value from object of type %s.", fieldName, getClassName(target)), e);
        }
    }
View Full Code Here

        try {
            LOGGER.debug("Instantiating object of type {}...", type.getCanonicalName());
            return Validate.notNull(type.newInstance());
        }
        catch (InstantiationException e) {
            throw new CassidyException(String.format("Unable to instantiate object of type %s.", type.getName()), e);
        }
        catch (IllegalAccessException e) {
            throw new CassidyException(String.format("Type %s has no accessible default constructor.", type.getName()), e);
        }
    }
View Full Code Here

        try {
            LOGGER.debug("Setting field {} to value {} on object {}...", fieldName, value, target);
            FieldUtils.writeField(target, fieldName, value, true);
        }
        catch (IllegalAccessException e) {
            throw new CassidyException(String.format("Unable to write field %s value on object of type %s.", fieldName, getClassName(target)), e);
        }
    }
View Full Code Here

        for (Disassembler disassembler : disassemblers) {
            if (disassembler.canDisassemble(object)) {
                return disassembler;
            }
        }
        throw new CassidyException(String.format("No disassembler found for object of type %s.", object.getClass().getName()));
    }
View Full Code Here

            cluster.addColumnFamily(definition, true);
            LOGGER.info("Column family {}:{} created successfully.", definition.getKeyspaceName(), definition.getName());
        }
        catch (HInvalidRequestException e) {
            LOGGER.warn("Unable to create column family {}:{}!", definition.getKeyspaceName(), definition.getName(), e);
            throw new CassidyException(String.format("Unable to create column family %s:%s!", definition.getKeyspaceName(), definition.getName()), e);
        }
    }
View Full Code Here

    public static Object getFieldValue(Object target, String fieldName) {
        try {
            return FieldUtils.readField(target, fieldName, true);
        }
        catch (IllegalAccessException e) {
            throw new CassidyException(String.format("Unable to read field %s value from object of type %s.", fieldName, getClassName(target)), e);
        }
    }
View Full Code Here

        try {
            LOGGER.debug("Instantiating object of type {}...", type.getCanonicalName());
            return Validate.notNull(type.newInstance());
        }
        catch (InstantiationException e) {
            throw new CassidyException(String.format("Unable to instantiate object of type %s.", type.getName()), e);
        }
        catch (IllegalAccessException e) {
            throw new CassidyException(String.format("Type %s has no accessible default constructor.", type.getName()), e);
        }
    }
View Full Code Here

TOP

Related Classes of com.carmanconsulting.cassidy.exception.CassidyException

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.