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:
Kevin Roast
2010-02-12 12:54:21 +00:00
parent 9ff57c2227
commit 3596c4e344

View File

@@ -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);
}
} }
}); });