Skip to content

Commit

Permalink
Merge pull request #484 from lennoxtr/Fix-Bug
Browse files Browse the repository at this point in the history
Fixed import bugs when import from file with invalid data
  • Loading branch information
lennoxtr authored Apr 10, 2023
2 parents 86a3610 + 19921dc commit a3a14e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/java/seedu/address/logic/LogicManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
public class LogicManager implements Logic {

public static final String FILE_OPS_ERROR_MESSAGE = "Could not save data to file: ";
public static final String FILE_READ_ERROR_MESSAGE = "Could not read data from file: ";
private final Logger logger = LogsCenter.getLogger(LogicManager.class);

private final Model model;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/logic/archive/Archive.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public CommandResult importFromArchive(Path archivedPath, Model model, boolean i
} catch (IOException ioe) {
throw new CommandException(LogicManager.FILE_OPS_ERROR_MESSAGE + ioe, ioe);
} catch (DataConversionException dce) {
throw new CommandException(LogicManager.FILE_OPS_ERROR_MESSAGE + dce, dce);
throw new CommandException(LogicManager.FILE_READ_ERROR_MESSAGE + dce, dce);
}

if (isImportingWholeArchive) {
Expand Down

0 comments on commit a3a14e4

Please sign in to comment.