-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: return empty document for non-existent file when parsing from pa…
…th (#1197) ### Motivation The document api rewrite introduced a breaking change (which affects internals as well) as the `DocumentFactory#read(Path)` (prior `Document#read(Path)`) now throws an exception in case the file does not exist rather than returing a new, empty document. ### Modification Let `DocumentFactory#read(Path)` return a new, empty document in case the file does not exist or is not a file and change the specification of the method to reflect the change. ### Result The `DocumentFactory#read(Path)` method now returns an empty document in case the file does either not exist or is not a regular file.
- Loading branch information
Showing
3 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters