Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion, Logging and Exception #93

Merged
merged 8 commits into from
Oct 14, 2024

Conversation

G13nd0n
Copy link

@G13nd0n G13nd0n commented Oct 14, 2024

Add Assertion, Logging and Exception.

Modify the delete function.

Add JUnit test for multiple outputs

Copy link

@yentheng0110 yentheng0110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, LGTM

Comment on lines +56 to +58
} catch (Exception e) {
logger.log(Level.WARNING, "Error processing deletion");
System.out.println("Error in deleting files, specific error: " + e.getMessage());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of catch statement to catch an exception processing the delete command and print out the specific error message

Comment on lines +176 to +178
assert nric != null:
"Please provide a valid NRIC";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of assertion to assert nric != null when user wants to delete a specific patient record

@yentheng0110 yentheng0110 merged commit ea865d4 into AY2425S1-CS2113-T10-2:master Oct 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants