The Telerik Platform product is retired.Learn more

Exception Handling

Exception Handling

When you invoke Backend Services Android SDK methods, errors might sometimes occur. For example, if you invoke a method on a device that has no internet connection at the time, an error will occur. You can use the RequestResult object's getError() method, which returns an EverliveException instance. You can get the internal error code, the error message or re-throw it in order to catch it in a parent method.

executeAsync(new RequestResultCallbackAction<ArrayList<Activity>>() {
        public void invoke(RequestResult<ArrayList<Activity>> requestResult) {
            if (requestResult.getSuccess()) {
                for (Activity activity : requestResult.getValue()) {
            } else {

All error messages from Telerik Platform will have an error code and a text part. However if a different kind of error (exception) occurs in the process of deserializing (e.g. an IOException), then the real exception is wrapped in an EverliveException. The original exception message could then be obtained through this method:

Contact us: +1-888-365-2779
Copyright © 2016-2018, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.