} catch (ConfigEditorException e) {
log.error("There was an error while trying to update " + configEditor.getConfigFile(), e);
if (e.getCause() instanceof YAMLException) {
log.info("Attempting to restore " + configEditor.getConfigFile());
try {
configEditor.restore();
result.setErrorMessage("Failed to update configuration file [" + configEditor.getConfigFile() + "]: " +
ThrowableUtil.getAllMessages(e.getCause()));
} catch (ConfigEditorException e1) {
log.error("Failed to restore " + configEditor.getConfigFile() + ". A copy of the file prior to any modifications " +
"can be found at " + configEditor.getBackupFile());