自定义grails异常消息

自定义grails异常消息,grails,Grails,当我在日期字段上指定为空时(该字段已填充时间部分,因此不为空),UI中将显示以下消息 Failed to convert property value of type java.lang.String to required type org.joda.time.DateTime for property responseRequiredDate; nested exception is java.lang.IllegalArgumentException: Invalid format: "s

当我在日期字段上指定为空时(该字段已填充时间部分,因此不为空),UI中将显示以下消息

Failed to convert property value of type java.lang.String to required type org.joda.time.DateTime for property responseRequiredDate; nested exception is java.lang.IllegalArgumentException: Invalid format: "structT00:00:00"
有没有办法自定义此消息。或者是否需要如本文所述的自定义异常处理


谢谢。

这是个例外。好吧,你只能通过捕捉并输出你想要的东西来定制它