|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.degreedays.api.DegreeDaysApiException
net.degreedays.api.FailureException
net.degreedays.api.data.SourceDataException
public final class SourceDataException
Indicates a Failure
to generate a DataSet
caused by problems
with the source temperature data for the Location
and Period
requested.
For a LocationDataRequest
containing specifications for multiple sets
of data, it is possible for some to succeed and others to fail if they are
sufficiently different (e.g. covering different periods in time).
This exception corresponds to any failure code starting with "SourceData".
You can interrogate the
isDueToXXX()
methods of this exception to find out more
about the cause. But do note that it is possible for none of those methods to
return true
if a relevant new failure code is added into the API. Be
prepared for this in your handling.
Instances of this class are immutable. You can safely reuse them and call them from multiple threads at once.
Method Summary | |
---|---|
boolean |
isDueToSourceDataCoverage()
Returns true if the requested data could not be generated
because the source weather station's recorded temperature data did not
cover the requested period in time. |
boolean |
isDueToSourceDataErrors()
Returns true if the requested data could not be generated
because of errors in the recorded temperature data of the source weather
station. |
Methods inherited from class net.degreedays.api.FailureException |
---|
failure, getMessage |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public boolean isDueToSourceDataErrors()
true
if the requested data could not be generated
because of errors in the recorded temperature data of the source weather
station.
Generally speaking, if a request for data from a weather station results in this error, it is probably best to find an alternative weather station nearby. But a weather station with data errors is not necessarily totally useless - it may make a revival at some point in the future, and it's possible that data requests covering a different period in time will work OK.
isDueToXXX()
methodspublic boolean isDueToSourceDataCoverage()
true
if the requested data could not be generated
because the source weather station's recorded temperature data did not
cover the requested period in time.
This will arise if you request data too early (because the weather station hasn't yet recorded the necessary temperature readings or they haven't yet filtered into our system), or if the weather station didn't exist or wasn't recording for the requested period in time.
isDueToXXX()
methods
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |