The Impossible FX Java SDK uses runtime (or unchecked) exceptions instead of checked exceptions for a few reasons:
FXServiceException is the most common exception that you'll experience when using the SDK for Java. This exception represents an error response from an Impossible FX service. For example, if you try to delete a project that doesn't exist, the SDK will return an error response and all the details of that error response will be included in the thrown FXServiceException. For some cases, a subclass of FXServiceException will be thrown to allow developers fine grained control over handling error cases through catch blocks.
When you encounter an FXServiceException, you know that your request was successfully sent to the service, but could not be successfully processed either because of errors in the request's parameters or because of issues on the service side.
FXServiceException provides you with information such as:
- Returned HTTP status codeFXClientException indicates that a problem occurred inside the Java client code, either while trying to send a request to Impossible or while trying to parse a response from the service. FXClientException exceptions are generally more severe than FXServiceException exceptions and indicate a major problem that is preventing the client from being able to make service calls to our services. For example, the Java SDK will throw an FXClientException if no network connection is available when you try to call an operation on one of the clients.
Terms of Use | © 2017, Impossible Software, or its affiliates.