List of usage examples for org.apache.commons.math3.exception.util DummyLocalizable DummyLocalizable
public DummyLocalizable(final String source)
From source file:org.orekit.SolarInputs97to05.java
private void findClosestLine(AbsoluteDate date) throws OrekitException { if ((date.durationFrom(firstDate) < 0) || (date.durationFrom(lastDate) > Constants.JULIAN_DAY)) { throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE, date, firstDate, lastDate); }//ww w .j a v a2 s . co m // don't search if the cached selection is fine if ((currentParam != null) && (date.durationFrom(currentParam.date) >= 0) && (date.durationFrom(currentParam.date) < Constants.JULIAN_DAY)) { return; } LineParameters before = new LineParameters(date.shiftedBy(-Constants.JULIAN_DAY), null, 0, 0, 0, 0, 0, 0); // search starting from entries a few steps before the target date SortedSet<TimeStamped> tailSet = data.tailSet(before); if (tailSet != null) { currentParam = (LineParameters) tailSet.first(); if (currentParam.date.durationFrom(date) == -Constants.JULIAN_DAY) { currentParam = (LineParameters) data.tailSet(date).first(); } } else { throw new OrekitException(new DummyLocalizable("unable to find data for date {0}"), date); } }