Skip to content

Commit

Permalink
Fixing error message handling for the Import dialog. Also updated the
Browse files Browse the repository at this point in the history
TextBundle#get method to check for the key. If the key does not exist,
return a string indicating was is missing to help track this down in the
future.
  • Loading branch information
a2geek committed Jan 9, 2022
1 parent 680c7ab commit 366c921
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ protected void initialize() {
* Retrieve a value for the given resource name.
*/
public String get(String name) {
return resourceBundle.getString(name);
if (resourceBundle.containsKey(name)) {
return resourceBundle.getString(name);
}
else {
return String.format("KeyNotFound: %s", name);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ DeleteFileHoverText=Delete a file (CTRL+D)
DeleteFileErrorTitle=Unable to view a deleted file!
ResizeDiskTitle = Resize disk?
ResizeDiskMessage = This disk needs to be resized to match the formatted capacity. This should be an ApplePC HDV disk image - they typically start at 0 bytes and grow to the maximum capacity (32MB). Resize the disk?
ImportFileTitle = Unable to import file(s)!
ImportMenuItem=Import...\tCTRL+I
ImportFileMessage = An error occurred during import!\n\nException was "{0}".
ImportErrorTitle = Unable to import file(s)!
ImportErrorMessage = An error occurred during import!\n\nException was "{0}".
FilesTab=Files
ExpandMenuItem=Expand\t+
CollapseMenuItem=Collapse\t-
Expand Down

0 comments on commit 366c921

Please sign in to comment.