public WrongDateFormatException() { super("Date must be either null or of format YYMMDDhhmmsstnnp"); setErrorCode(Data.ESME_RINVPARAM); }
int count = dateStr == null ? 1 : (dateStr.length() + 1); // 1 is for terminating zero if ((count != 1) && (count != Data.SM_DATE_LEN)) { throw new WrongDateFormatException(dateStr); if ("+-R".lastIndexOf(locTime) == -1) { throw new WrongDateFormatException( dateStr, "time difference relation indicator incorrect; " + "should be +, - or R and is " + locTime); throw new WrongDateFormatException(dateStr, "format of absolute date-time incorrect"); } catch (NumberFormatException e) { debug.write("Exception parsing relative date " + dateStr + " " + e); throw new WrongDateFormatException(dateStr, "format of relative date-time incorrect"); Integer.parseInt(tenthsOfSecStr); } catch (NumberFormatException e) { throw new WrongDateFormatException(dateStr, "non-numeric tenths of seconds " + tenthsOfSecStr); timeDiff = Integer.parseInt(timeDiffStr); } catch (NumberFormatException e) { throw new WrongDateFormatException(dateStr, "non-numeric time difference " + timeDiffStr); throw new WrongDateFormatException( dateStr, "time difference is incorrect; " + "should be between 00-48 and is " + timeDiffStr);
public WrongDateFormatException(String dateStr, String msg) { super("Invalid date " + dateStr + ": " + msg); setErrorCode(Data.ESME_RINVPARAM); } }
public WrongDateFormatException(String dateStr) { super("Date must be either null or of format YYMMDDhhmmsstnnp and not " + dateStr + "."); setErrorCode(Data.ESME_RINVPARAM); }
public void setValidityPeriod(String value) throws WrongDateFormatException { try { checkDate(value); } catch (WrongDateFormatException e) { e.setErrorCode(Data.ESME_RINVEXPIRY); throw e; } validityPeriod = value; }
public void setScheduleDeliveryTime(String value) throws WrongDateFormatException { try { checkDate(value); } catch (WrongDateFormatException e) { e.setErrorCode(Data.ESME_RINVSCHED); throw e; } scheduleDeliveryTime = value; }
public void setValidityPeriod(String value) throws WrongDateFormatException { try { checkDate(value); } catch (WrongDateFormatException e) { e.setErrorCode(Data.ESME_RINVEXPIRY); throw e; } validityPeriod = value; }
public void setScheduleDeliveryTime(String value) throws WrongDateFormatException { try { checkDate(value); } catch (WrongDateFormatException e) { e.setErrorCode(Data.ESME_RINVSCHED); throw e; } scheduleDeliveryTime = value; }