Skip to content

Conversation

DavyLandman
Copy link
Member

No description provided.

@DavyLandman DavyLandman requested a review from sungshik August 21, 2025 12:05
@DavyLandman DavyLandman force-pushed the fix/improve-error-messages branch from 9202f07 to e7e2d3f Compare August 21, 2025 12:31
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.0%. Comparing base (e4e29a0) to head (4dc4c07).

Files with missing lines Patch % Lines
src/main/java/engineering/swat/watch/Watch.java 66.6% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##              main     #68     +/-   ##
=========================================
+ Coverage     79.6%   80.0%   +0.3%     
- Complexity     174     176      +2     
=========================================
  Files           23      23             
  Lines          766     770      +4     
  Branches        88      89      +1     
=========================================
+ Hits           610     616      +6     
+ Misses          95      92      -3     
- Partials        61      62      +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@sungshik sungshik left a comment

Choose a reason for hiding this comment

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

LGTM!

throw new IllegalStateException("There is no onEvent handler defined");
}
if (!Files.exists(path)) {
throw new FileSystemException(path.toString(), null, "Cannot open a watch on a non-existing path");
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: NoSuchFileException is more accurate? (also in two places below)

Copy link
Member Author

Choose a reason for hiding this comment

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

true, but that doesn't allow us to pas in which path it more accurate. so thats why I went for their parent.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I might be misunderstanding your point, so at the risk of telling you something you already know 😉: NoSuchFileException has a constructor with the same arguments as FileSystemException.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah right, I first added the one for the directory exception and NotDirectoryException did not have this overload, so I went to it's parent and stayed there.

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