|
15 | 15 | import uk.ac.exeter.QuinCe.data.Files.DataFile; |
16 | 16 | import uk.ac.exeter.QuinCe.data.Files.DataFileException; |
17 | 17 | import uk.ac.exeter.QuinCe.data.Files.ValueNotNumericException; |
18 | | -import uk.ac.exeter.QuinCe.utils.ExceptionUtils; |
19 | 18 |
|
20 | 19 | /** |
21 | 20 | * Defines how the date and time are stored in a data file |
@@ -873,7 +872,6 @@ private LocalDateTime getHoursFromStartDate(LocalDateTime headerDate, |
873 | 872 | try { |
874 | 873 | result = headerDate.plusSeconds(lineSeconds); |
875 | 874 | } catch (DateTimeException e) { |
876 | | - ExceptionUtils.printStackTrace(e); |
877 | 875 | throw new DateTimeSpecificationException( |
878 | 876 | "Invalid hours value: " + e.getMessage()); |
879 | 877 | } |
@@ -913,7 +911,6 @@ private LocalDateTime getSecondsFromStartDate(LocalDateTime headerDate, |
913 | 911 | try { |
914 | 912 | result = headerDate.plusSeconds(Math.round(seconds)); |
915 | 913 | } catch (DateTimeException e) { |
916 | | - ExceptionUtils.printStackTrace(e); |
917 | 914 | throw new DateTimeSpecificationException( |
918 | 915 | "Invalid hours value: " + e.getMessage()); |
919 | 916 | } |
@@ -944,7 +941,6 @@ private LocalDateTime getDateTime(List<String> line) |
944 | 941 | try { |
945 | 942 | result = LocalDateTime.parse(fieldValue, assignment.getFormatter()); |
946 | 943 | } catch (DateTimeParseException e) { |
947 | | - ExceptionUtils.printStackTrace(e); |
948 | 944 | throw new DateTimeSpecificationException( |
949 | 945 | "Invalid date/time value '" + fieldValue + "'"); |
950 | 946 | } |
@@ -977,7 +973,6 @@ private LocalDateTime getUnixTime(List<String> line) |
977 | 973 | result = LocalDateTime.ofEpochSecond(Integer.parseInt(fieldValue), 0, |
978 | 974 | ZoneOffset.UTC); |
979 | 975 | } catch (DateTimeParseException e) { |
980 | | - ExceptionUtils.printStackTrace(e); |
981 | 976 | throw new DateTimeSpecificationException( |
982 | 977 | "Invalid date/time value '" + fieldValue + "'"); |
983 | 978 | } |
@@ -1034,7 +1029,6 @@ private LocalDateTime getYearJDayTime(List<String> line) |
1034 | 1029 | double secondsFraction = jdayTime - jdayTime.intValue(); |
1035 | 1030 | result = result.plusSeconds((int) (secondsFraction * 86400)); |
1036 | 1031 | } catch (DateTimeException e) { |
1037 | | - ExceptionUtils.printStackTrace(e); |
1038 | 1032 | throw new DateTimeSpecificationException( |
1039 | 1033 | "Invalid date/time value: " + e.getMessage()); |
1040 | 1034 | } |
@@ -1118,7 +1112,6 @@ private LocalDate getYearJDay(List<String> line) |
1118 | 1112 | try { |
1119 | 1113 | result = LocalDate.ofYearDay(year, jday); |
1120 | 1114 | } catch (DateTimeException e) { |
1121 | | - ExceptionUtils.printStackTrace(e); |
1122 | 1115 | throw new DateTimeSpecificationException( |
1123 | 1116 | "Invalid date/time: " + e.getMessage()); |
1124 | 1117 | } |
@@ -1176,7 +1169,6 @@ private LocalDate getYMDDate(List<String> line) |
1176 | 1169 | try { |
1177 | 1170 | result = LocalDate.of(year, month, day); |
1178 | 1171 | } catch (DateTimeException e) { |
1179 | | - ExceptionUtils.printStackTrace(e); |
1180 | 1172 | throw new DateTimeSpecificationException( |
1181 | 1173 | "Invalid date value: " + e.getMessage()); |
1182 | 1174 | } |
@@ -1259,7 +1251,6 @@ private LocalTime getHMSTime(List<String> line) |
1259 | 1251 | try { |
1260 | 1252 | result = LocalTime.of(hour, minute, second); |
1261 | 1253 | } catch (DateTimeException e) { |
1262 | | - ExceptionUtils.printStackTrace(e); |
1263 | 1254 | throw new DateTimeSpecificationException( |
1264 | 1255 | "Invalid time value: " + e.getMessage()); |
1265 | 1256 | } |
|
0 commit comments