Skip to content

Commit

Permalink
Merge branch 'NWuensche-fixExceptionAddEntryNoServer'
Browse files Browse the repository at this point in the history
  • Loading branch information
di72nn committed Aug 20, 2019
2 parents 7544f19 + ec8e35b commit cba1a79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ private Pair<ActionResult, Long> 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) {
Expand Down

0 comments on commit cba1a79

Please sign in to comment.