mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +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)
|
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)
|
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