I'm somewhat new to Grails. As I create or update domain object and fire save()
or validate()
on an object, if the method fails, the system does not seem throw an exception. I dont see any way to examine what exactly is failing.
A typical snippet:
if (domainInstance.validate()) {
flash.message = "Succesfully updated domain object"
} else {
flash.message = "Failed to update domain object"
//throw new RuntimeException("Invalid broker")
log.error "Failed to update domain object"
}
In my case the validate fails, and I am in the dark as to why. Could anybody shed some light on it?
If placed into a try/catch, this does not throw an exception.