cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DennisDam (JIRA)" <>
Subject [jira] Commented: (COCOON-1897) i18n transformer: catch date parsing exceptions silently
Date Thu, 24 Aug 2006 20:14:32 GMT
    [ ] 
DennisDam commented on COCOON-1897:

One usecase is fetching a date from a backend system where the value is entered by the user.
If the format of the date is wrong, the whole page will break down because of the exception.
To prevent this, you will have to check manually whether the date is empty / format of the
date is correct.
The whole point is: I don't want to add a format check every time I want to convert a date
format. It makes life easier, and makes your code less error prone.
By the way, what we could also do is , instead of returning an empty string (like in my patch),
we return something more meaningful, like "error" or "invalid date format".

> i18n transformer: catch date parsing exceptions silently
> --------------------------------------------------------
>                 Key: COCOON-1897
>                 URL:
>             Project: Cocoon
>          Issue Type: Improvement
>          Components: * Cocoon Core
>    Affects Versions: 2.1.8, 2.1.9, 2.1.10-dev (current SVN)
>            Reporter: DennisDam
>         Attachments:
> When an empty/incorrect date value is specified, the i18n transformer throws an exception,
breaking the whole page. 
> This exception needs to be caught and handled silently. The patch logs a warning message
and returns an empty result when date parsing fails.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message