Package com.carmanconsulting.cassidy.exception

Examples of com.carmanconsulting.cassidy.exception.CassidyException


        try {
            LOGGER.debug("Getting field {} value from object {} (type={})...", fieldName, target, getClassName(target));
            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 {} (type={})...", fieldName, value, target, getClassName(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

                this.typeName = in.readUTF();
                bytes = new byte[in.readInt()];
                in.readFully(bytes);
                break;
            default:
                throw new CassidyException(String.format("Version %d not supported.", version));
        }
    }
View Full Code Here

                    Object serializer = instantiateSerializer(serializerType);
                    addSerializer(type, serializerType, serializer);
                }
            }
            catch (IOException e) {
                throw new CassidyException(String.format("Unable to load serializers from %s.", url.toExternalForm()), e);
            }
        }
    }
View Full Code Here

        if (serializer instanceof Serializer) {
            addSerializer(type, (Serializer<Object>) serializer);
        } else if (serializer instanceof SerializerFactory) {
            addSerializer(type, (SerializerFactory<Object>) serializer);
        } else {
            throw new CassidyException(String.format("Invalid serializer type %s.", serializerType.getCanonicalName()));
        }
    }
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.