You are right. I can. I was getting a

"exception javax.xml.bind.ValidationException is never thrown in body of
corresponding try statement"

not a

"org.apache.cayenne.validation.ValidationException is never thrown in
body of corresponding try statement"

so I wrote:

catch(org.apache.cayenne.validation.ValidationException vex) {
        // ...
}

and it works.

Sorry for all this trouble caused by my inattention.

Thank you,
Nikos


Στις 12-03-2009, ημέρα Πεμ, και ώρα 11:13 +0200, ο/η Andrus Adamchik
έγραψε:
> On Mar 12, 2009, at 11:03 AM, Νίκος Παράσχου wrote:
> 
> > I meant that I can't write the following because it can't be compiled
> > (note that a ValidationException is caught):
> >
> > try {
> >        context.commitChanges();
> > }
> > catch(ValidationException vex) {
> >        // ...
> > }
> 
> Yes you can. Just try it.
> 
> Andrus

Reply via email to