private void errorDidOccur(@Nullable Callback<MapMatchingResponse> callback, @NonNull Response<MapMatchingResponse> response) { // Response gave an error, we try to LOGGER any messages into the LOGGER here. Converter<ResponseBody, MapMatchingError> errorConverter = getRetrofit().responseBodyConverter(MapMatchingError.class, new Annotation[0]); if (callback == null) { Logger.getLogger(MapboxMapMatching.class.getName()).log( Level.WARNING, "Failed to complete your request and callback is null"); } else { try { callback.onFailure(getCall(), new Throwable(errorConverter.convert(response.errorBody()).message())); } catch (IOException ioException) { Logger.getLogger(MapboxMapMatching.class.getName()).log( Level.WARNING, "Failed to complete your request. ", ioException); } } }
private void errorDidOccur(@Nullable Callback<MapMatchingResponse> callback, @NonNull Response<MapMatchingResponse> response) { // Response gave an error, we try to LOGGER any messages into the LOGGER here. Converter<ResponseBody, MapMatchingError> errorConverter = getRetrofit().responseBodyConverter(MapMatchingError.class, new Annotation[0]); if (callback == null) { Logger.getLogger(MapboxMapMatching.class.getName()).log( Level.WARNING, "Failed to complete your request and callback is null"); } else { try { callback.onFailure(getCall(), new Throwable(errorConverter.convert(response.errorBody()).message())); } catch (IOException ioException) { Logger.getLogger(MapboxMapMatching.class.getName()).log( Level.WARNING, "Failed to complete your request. ", ioException); } } }
private void errorDidOccur(@Nullable Callback<MapMatchingResponse> callback, @NonNull Response<MapMatchingResponse> response) { // Response gave an error, we try to LOGGER any messages into the LOGGER here. Converter<ResponseBody, MapMatchingError> errorConverter = getRetrofit().responseBodyConverter(MapMatchingError.class, new Annotation[0]); if (callback == null) { Logger.getLogger(MapboxMapMatching.class.getName()).log( Level.WARNING, "Failed to complete your request and callback is null"); } else { try { callback.onFailure(getCall(), new Throwable(errorConverter.convert(response.errorBody()).message())); } catch (IOException ioException) { Logger.getLogger(MapboxMapMatching.class.getName()).log( Level.WARNING, "Failed to complete your request. ", ioException); } } }