ValidationException and Barracuda revision 237+

"Shawn A. Wilson" <[email protected]> Tue, 07 Jun 2011 20:12:56 -0600
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1307499344-26124-1871
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Franck,

Glad to see there is still a little action on the Barracuda commits! I
have been out of the loop for a while and am just getting resubscribed
to the lists. Anyways, in doing some additional contract work with PAI
who still uses Barracuda we have checked into upgrading but find one
major incompatibility, from changeset 237:

fro_2010-12-09 - Modified DeferredValidationException and
ValidationException to fix problems with lost
                           exceptions when ValidationException had
subExceptions and was a meaningful exception itself.
                           Now ValidationException cannot have
subexceptions, and DeferredValidationException connat carry
                           meaningful informations (it is only a
container). _BEWARE_ This changes break compatibility.
                           Make ErroeManager able to handle a source
object that is a list (ie an error can be related to multiple
                           form fields).

The problem is this ties additional, contrasting meanings to
ValidationException and DeferredValidationException that we did not
anticipate. We currently use both for a single field as well as both as
containers for multiple field errors, deferred and non-deferred. We are
aware of a bug in ErrorManager that prevents us attaching a field while
also adding sub exceptions, and so we have been careful to always add
sub exceptions and not attach directly.

So, without getting too deep into the code at this time perhaps you can
share some additional insight into what brought the change? I think a
proper fix could be made in ErrorManager, or perhaps we need to better
work out the container vs. non-container mechanics of both, but I feel
it's important that we retain the same API independent of whether or not
the exception is deferred.

Please let me know your thoughts on this.

Thanks,
-shawn

------------=_1307499344-26124-1871
Content-Type: text/plain; charset="UTF-8"; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: quoted-printable

=0D
--=0D
Barracuda mailing list=0D
[email protected]=0D
http://www.ow2.org/wws/lists/projects/barracuda=0D

------------=_1307499344-26124-1871--