diff --git a/src/main/java/com/ctrip/zeus/service/nginx/impl/NginxServiceImpl.java b/src/main/java/com/ctrip/zeus/service/nginx/impl/NginxServiceImpl.java index a9af7f1e..2b01dc9e 100644 --- a/src/main/java/com/ctrip/zeus/service/nginx/impl/NginxServiceImpl.java +++ b/src/main/java/com/ctrip/zeus/service/nginx/impl/NginxServiceImpl.java @@ -98,7 +98,17 @@ public class NginxServiceImpl implements NginxService { @Override public boolean writeALLToDisk(Long slbId, Integer slbVersion ,List vsIds) throws Exception { - return writeALLToDisk(slbId,slbVersion,vsIds, null); + List responses = new ArrayList<>(); + if (!writeALLToDisk(slbId,slbVersion,vsIds, responses)){ + for (NginxResponse response : responses){ + if (!response.getSucceed()){ + throw new Exception("Write To Disk Failed! Detail: "+String.format(NginxResponse.JSON,response)); + } + } + throw new Exception("Write To Disk Failed! Detail: None."); + }else{ + return true; + } } @Override