diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/service/IntentServiceBase.java b/app/src/main/java/fr/gaulupeau/apps/Poche/service/IntentServiceBase.java index 69e101cb5..ab077e347 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/service/IntentServiceBase.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/service/IntentServiceBase.java @@ -75,6 +75,9 @@ protected ActionResult processException(Exception e, String scope) { } // IOExceptions in most cases mean temporary error, // in some cases may mean that the action was completed anyway. + } else if(e instanceof IllegalArgumentException && !getSettings().isConfigurationOk()) { + result.setErrorType(ActionResult.ErrorType.INCORRECT_CONFIGURATION); + result.setMessage(e.toString()); } else { // other exceptions meant to be handled outside result.setErrorType(ActionResult.ErrorType.UNKNOWN); result.setMessage(e.toString()); diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/service/MainService.java b/app/src/main/java/fr/gaulupeau/apps/Poche/service/MainService.java index 5ade05888..2fe0df396 100644 --- a/app/src/main/java/fr/gaulupeau/apps/Poche/service/MainService.java +++ b/app/src/main/java/fr/gaulupeau/apps/Poche/service/MainService.java @@ -260,7 +260,7 @@ private Pair syncOfflineQueue(ActionRequest actionRequest) { default: throw new IllegalArgumentException("Unknown action: " + action); } - } catch(IncorrectConfigurationException | UnsuccessfulResponseException | IOException e) { + } catch(IncorrectConfigurationException | UnsuccessfulResponseException | IOException | IllegalArgumentException e) { ActionResult r = processException(e, "syncOfflineQueue()"); if(!r.isSuccess()) itemResult = r; } catch(Exception e) {