Skip to content

Commit

Permalink
Improve errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dordsor21 committed Nov 4, 2024
1 parent 0f8e629 commit 2f38ad6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -568,14 +568,14 @@ public void loadClipboardFromDisk() {
print(e.getComponent());
} catch (RuntimeException e) {
print(Caption.of("fawe.error.clipboard.invalid"));
LOGGER.error("Error loading clipboard form disk", e);
LOGGER.error("Error loading clipboard from disk", e);
print(Caption.of("fawe.error.stacktrace"));
print(Caption.of("fawe.error.clipboard.load.failure"));
print(Caption.of("fawe.error.clipboard.invalid.info", file.getName(), file.length()));
print(Caption.of("fawe.error.stacktrace"));
} catch (Exception e) {
print(Caption.of("fawe.error.clipboard.invalid"));
LOGGER.error("Error loading clipboard form disk", e);
LOGGER.error("Error loading clipboard from disk", e);
print(Caption.of("fawe.error.stacktrace"));
print(Caption.of("fawe.error.no-failure"));
print(Caption.of("fawe.error.clipboard.invalid.info", file.getName(), file.length()));
Expand All @@ -589,12 +589,8 @@ public void loadClipboardFromDisk() {
}
fut.get();
} catch (Exception e) {
print(Caption.of("fawe.error.clipboard.invalid"));
LOGGER.error("Error loading clipboard form disk", e);
print(Caption.of("fawe.error.stacktrace"));
print(Caption.of("fawe.error.no-failure"));
print(Caption.of("fawe.error.clipboard.invalid.info", file.getName(), file.length()));
print(Caption.of("fawe.error.stacktrace"));
LOGGER.error("Error loading clipboard from disk", e);
print(Caption.of("fawe.error.clipboard.load.failure"));
}
}
//FAWE end
Expand Down
2 changes: 1 addition & 1 deletion worldedit-core/src/main/resources/lang/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"fawe.error.parse.no-clipboard-source": "No clipboards found at given source: {0}",
"fawe.error.clipboard.invalid": "====== INVALID CLIPBOARD ======",
"fawe.error.clipboard.invalid.info": "File: {0} (len: {1})",
"fawe.error.clipboard.load.failure": "Could not load clipboard. Possible that the clipboard is still being written to from another server?!",
"fawe.error.clipboard.load.failure": "Unexpected failure loading clipboard from disk!",
"fawe.error.clipboard.on.disk.version.mismatch": "Clipboard version mismatch: expected {0} but got {1}. It is recommended you delete the clipboard folder and restart the server.\nYour clipboard folder is located at {2}.",
"fawe.error.limit.disallowed-block": "Your limit disallows use of block '{0}'",
"fawe.error.limit.disallowed-property": "Your limit disallows use of property '{0}'",
Expand Down

0 comments on commit 2f38ad6

Please sign in to comment.