Package com.carmanconsulting.cassidy.exception

Examples of com.carmanconsulting.cassidy.exception.CassidyException


        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


            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

    public static <T> T instantiate(Class<T> type) {
        try {
            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

    public static void setFieldValue(Object target, String fieldName, Object value) {
        try {
            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

        for (String expression : expressions) {
            try {
                values.add(new IndexValue<Object>(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

        for (String expression : expressions) {
            try {
                values.add(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 Enumeration<URL> getResources(String name) {
        try {
            return classLoader().getResources(name);
        }
        catch (IOException e) {
            throw new CassidyException(String.format("Unable to load resources named %s.", name), e);
        }
    }
View Full Code Here

    public <T> Class<T> resolveClass(String className) {
        try {
            return (Class<T>) Class.forName(className, false, classLoader());
        }
        catch (ClassNotFoundException e) {
            throw new CassidyException(String.format("Unable to resolve class %s.", className), 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.