Skip to content

Commit

Permalink
docs: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbuon committed Sep 4, 2024
1 parent fafa23c commit 269d4f6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ private DiskQueue(Builder builder) {
this.maxSize = builder.maxSize;
this.queueFolder = builder.queueFolder;

/*
A RuntimeException can cause a silent crash, since the error would not be saved and in the next
session there would be no payload to send. So we just log the error.
*/
if (!this.queueFolder.exists()) {
if (!this.queueFolder.mkdirs()) {
LOGGER.error("Could not create folder: {}", queueFolder);
Expand Down

0 comments on commit 269d4f6

Please sign in to comment.