Skip to content

Commit a2919dc

Browse files
authored
Made exception more specific
1 parent 4dc4c07 commit a2919dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/engineering/swat/watch/Watch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ private void validateOptions() throws IOException {
187187
throw new IllegalStateException("There is no `on` handler defined");
188188
}
189189
if (!Files.exists(path)) {
190-
throw new FileSystemException(path.toString(), null, "Cannot open a watch on a non-existing path");
190+
throw new NoSuchFileException(path.toString(), null, "Cannot open a watch on a non-existing path");
191191
}
192192
switch (scope) {
193193
case PATH_AND_CHILDREN: // intended fallthrough

0 commit comments

Comments
 (0)