Package grails.validation.exceptions

Examples of grails.validation.exceptions.ConstraintException


            return c != null && c.supports(propertyType);
        }
        catch (Exception e) {
            LOG.error("Exception thrown instantiating constraint [" + constraintName +
                    "] to class [" + owningClass + "]", e);
            throw new ConstraintException("Exception thrown instantiating  constraint [" + constraintName +
                    "] to class [" + owningClass + "]", e);
        }
    }
View Full Code Here


                    }
                }
                catch (Exception e) {
                    LOG.error("Exception thrown applying constraint [" + constraintName +
                            "] to class [" + owningClass + "] for value [" + constrainingValue + "]: " + e.getMessage(), e);
                    throw new ConstraintException("Exception thrown applying constraint [" + constraintName +
                            "] to class [" + owningClass + "] for value [" + constrainingValue + "]: " + e.getMessage(), e);
                }
            }
        }
        else if (bean.isWritableProperty(constraintName)) {
            bean.setPropertyValue(constraintName, constrainingValue);
        }
        else {
            throw new ConstraintException("Constraint [" + constraintName + "] is not supported for property [" +
                    propertyName + "] of class [" + owningClass + "] with type [" + propertyType + "]");
        }
    }
View Full Code Here

TOP

Related Classes of grails.validation.exceptions.ConstraintException

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.