|
|
@@ -409,9 +409,13 @@ public class DateFunc {
|
|
|
* @throws ParseException 解析异常
|
|
|
* @return 结果
|
|
|
*/
|
|
|
- public static Date getDate(String date, String format) throws ParseException {
|
|
|
+ public static Date getDate(String date, String format) {
|
|
|
SimpleDateFormat sd = new SimpleDateFormat(format);
|
|
|
- return sd.parse(date);
|
|
|
+ try {
|
|
|
+ return sd.parse(date);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ throw new BusinessException("日期格式错误");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|