You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ashwin Prabhu (JIRA)" <de...@myfaces.apache.org> on 2014/05/02 17:28:14 UTC
[jira] [Updated] (TRINIDAD-2470) GenericConverterFactory needs to
throw TypeConversionException in response to exceptions during conversion
[ https://issues.apache.org/jira/browse/TRINIDAD-2470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashwin Prabhu updated TRINIDAD-2470:
------------------------------------
Status: Patch Available (was: Open)
> GenericConverterFactory needs to throw TypeConversionException in response to exceptions during conversion
> ----------------------------------------------------------------------------------------------------------
>
> Key: TRINIDAD-2470
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2470
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Affects Versions: 2.1.0-core
> Environment: N/A
> Reporter: Ashwin Prabhu
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The convert implementation in GenericConverterFactory has the following code:
> TypeConverter converter = getConverter(source.getClass(), targetType);
> if (converter != null)
> {
> return converter.convert(source, targetType);
> }
> throw new TypeConversionException(source, targetType);
> In addition to throwing TypeConversionException for missing converters, the above code needs to capture and re-throw any exception resulting during the conversion as TypeConversionException for the caller to handle them.
> Currently exceptions during the type conversion stage, unless they are ConverterExceptions remain unhandeled and cause PPR errors
--
This message was sent by Atlassian JIRA
(v6.2#6252)