geosmart commented on issue #3556:
URL: 
https://github.com/apache/incubator-dolphinscheduler/issues/3556#issuecomment-677671084


   I just remove the try catch, no need to catch ,
   the parse will return null rather than throw exception 
   ```
   
       /**
        * convert string to date and time
        *
        * @param date date
        * @param format format
        * @return date
        */
       public static Date parse(String date, String format) {
           try {
               LocalDateTime ldt = LocalDateTime.parse(date, 
DateTimeFormatter.ofPattern(format));
               return localDateTime2Date(ldt);
           } catch (Exception e) {
               logger.error("error while parse date:" + date, e);
           }
           return null;
       }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to