On Sat, Apr 11, 2009 at 9:45 AM, Michael Mallete <
mrmallete@...> wrote:
> }
> service:
> service method:
> def update(book)
> {
> if(!book.hasErrors() || book.save())
> {
> //do something
> }
> else
> {
> throw new RuntimeException()
> }
> ..
> ..
> }
Do you want && in that condition, not || ? I assume that your intent
is to throw the exception if save() fails. That is, in order to _not_
throw the exception the object needs to not have errors _and_ save
needs to succeed.
jb
--
Jeff Brown
SpringSource
http://www.springsource.com/Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email