mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix to catch PlatformRuntimeException (from SpringSurf) and throw out expected exception where appropriate.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18612 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -587,7 +587,14 @@ public class DefaultTypeConverter
|
||||
{
|
||||
public String convert(Date source)
|
||||
{
|
||||
return ISO8601DateFormat.format(source);
|
||||
try
|
||||
{
|
||||
return ISO8601DateFormat.format(source);
|
||||
}
|
||||
catch (PlatformRuntimeException e)
|
||||
{
|
||||
throw new TypeConversionException("Failed to convert date " + source + " to string", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -770,7 +777,14 @@ public class DefaultTypeConverter
|
||||
{
|
||||
public String convert(Calendar source)
|
||||
{
|
||||
return ISO8601DateFormat.format(source.getTime());
|
||||
try
|
||||
{
|
||||
return ISO8601DateFormat.format(source.getTime());
|
||||
}
|
||||
catch (PlatformRuntimeException e)
|
||||
{
|
||||
throw new TypeConversionException("Failed to convert date " + source + " to string", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user