Hi Felix, I remember seeing the same behaviour you mention in the past - ValidationExceptions being handled correctly but also being logged as an error. But I've not seen it happen in a while now and after a quick test I'm not able to replicate it either. We're using T5.2.6, you may want to try updating to see if the problem still exists.
Steve. On 2 October 2011 01:31, Lenny Primak <lpri...@hope.nyc.ny.us> wrote: > I think you can do <component>.recordError() to do the same thing without > throwing the exception. Since no one is handling the exception in your case > it just flows to the standard error handler and sends you the email. > > > > On Oct 1, 2011, at 12:15 PM, Felix Gonschorek <fe...@netzgut.net> wrote: > >> Hi all, >> >> i encountered a undesired behaviour in our apps: When using an "validate" >> component event handler that validates a single field and this handler >> throws an >> org.apache.tapestry5.ValidationException, this exception is logged with >> level ERROR: >> >> <snip> >> [ERROR] ioc.Registry org.apache.tapestry5.ValidationException: ERROR >> [ERROR] ioc.Registry Operations trace: >> [ERROR] ioc.Registry [ 1] Triggering event 'action' on Test:form >> [ERROR] ioc.Registry [ 2] Triggering event 'validate' on Test:textfield >> </snap> >> >> this is the event handler: >> >> <snip> >> @OnEvent(value = EventConstants.VALIDATE, component = "textfield") >> void onValidateFromTextfield(String value) throws ValidationException { >> throw new ValidationException("ERROR"); >> } >> </snap> >> >> Is this a desired behaviour? I think something like a full disk, a >> disconnected >> database or not enough RAM is an error, but not a failing user validation. >> >> - The page renders fine >> - The validation exception message is displayed to the user >> - so everything is okay, but the superfluous ERROR log - level statement. >> >> This happens with tapestry 5.2.5 - is something wrong with my code? >> >> I could ignore this, but i have configured our logging system to send >> alert-mails in case of an ERROR level log entry, an now i am getting mails >> evey >> time a user enters a invalid data Oo. >> >> I will file a bug report if i am not completely off the track, so if someone >> can >> get me short feedback i would be greatful. >> >> thanks >> felix >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org