Class DegreeDaysApiException

  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.degreedays.api.DegreeDaysApiException
All Implemented Interfaces:
Direct Known Subclasses:
DataTransformException, FailureException, TransportException

public abstract class DegreeDaysApiException
extends java.lang.RuntimeException

Superclass of all the API exceptions that you are likely to want to catch explicitly.

Handling the exceptions thrown by this client library

Subclasses of this exception are thrown by all the methods accessible through DegreeDaysApi to indicate problems like network failure, service failure (our server-side processing going wrong), a rate limit being reached, invalid authentication credentials, and other types of exception that are specific to the API operation in question.

The likelyhood of many of these exceptions occurring will depend on how you are using the API. For example, if your customers install your application and then enter their own API access keys into it, you might expect the odd InvalidRequestException because of typos. However, such an exception would be less likely to occur if your application was a centrally-running background process that used a single API account to collect data. And consequently you might be less likely to want to handle InvalidRequestException explicitly.

This is an unchecked exception (a subclass of RuntimeException), so you don't need to handle it explicitly each time you call a method that can throw it (or a subclass of it). A typical approach would be to catch just those subclasses that you're interested in (if any), catching DegreeDaysApiException last as a kind of catch all, or just letting any unhandled exceptions bubble up the call stack. We made this an unchecked exception to give you more flexibilty in how you choose to handle it and its subclasses.

Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait