Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

returns null on parse error

  • Loading branch information...
commit 282580bb49262e2403aa93ebc0f7f8df3c691a80 1 parent 75e31d1
Bob Briski authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 piggy/src/date_utils/TimeZoneUtils.java
View
5 piggy/src/date_utils/TimeZoneUtils.java
@@ -27,8 +27,9 @@ public String exec(Tuple input) throws IOException {
try {
d = df1.parse(date);
- } catch (ParseException e) {
- e.printStackTrace();
+ } catch (Exception e) {
+ warn("Could not parse date: " + date + " with format: " + dateFormat, PigWarning.UDF_WARNING_1);
+ return null;
}
DateFormat df2 = new SimpleDateFormat(dateFormat);
Please sign in to comment.
Something went wrong with that request. Please try again.