Skip to content

Commit

Permalink
catch exception
Browse files Browse the repository at this point in the history
  • Loading branch information
HxpSerein committed Oct 25, 2024
1 parent 461b77c commit f6c0c6f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ private void classLoader() {
}
}

public void deleteDataNodeSystemProperties() throws IOException {
public void deleteDataNodeSystemProperties() {
DataNodeSystemPropertiesHandler.getInstance().delete();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,17 @@ public void resetFilePath(String filePath) {
this.tmpFile = SystemFileFactory.INSTANCE.getFile(filePath + ".tmp");
}

public void delete() throws IOException {
FileUtils.deleteFile(this.formalFile);
FileUtils.deleteFile(this.tmpFile);
public void delete() {
try {
FileUtils.deleteFile(this.formalFile);
} catch (IOException e) {
LOGGER.warn("Delete formalFile error, ", e);
}

try {
FileUtils.deleteFile(this.tmpFile);
} catch (IOException e) {
LOGGER.warn("Delete tmpFile error, ", e);
}
}
}

0 comments on commit f6c0c6f

Please sign in to comment.