-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Catch errors likely caused by null paths in db The errors caused by reading the db when a location with no path set has got into the database are actually `[InvalidCastException]`s thrown when trying to convert the identifiers from the database into strings for `[Location]`s. This is caused by entries inserted with no path calling `GetById($null)` so they get the 0-parameter version, https://github.com/mbdavid/LiteDB/blob/f7ee275908ca48156a9d0bed054809955843e4b0/LiteDB/Document/BsonValue.cs#L49 Restricting the `catch{}` to `[IOException]` also means it's possible to handle the file in use errors the retry logic is supposed to be handling separately to other types of error. * Move database retry logic inside catch block Should result in more understandable error messages than using `$Error[0]` and sometimes failing. Plus, will only trigger for `IOException`s, which is what the file locked errors are reported as. * Check for and remove problem entries in db If an `InvalidCastException` is encountered when running `DBFind`, run a query to check for entries that look abnormal and remove them from the database if found. * Add mandatory params to ZLocation.psd1 exports * Add mandatory params to ZLocation.Storage * Add mandatory parameters to ZLocation.Service `Add` and `Remove` could really use them, but can't add param blocks to class methods. * Add mandatory parameters to ZLocation.Search * Add mandatory parameters for IsExactMatch
- Loading branch information
1 parent
fd4b953
commit f6b093c
Showing
4 changed files
with
66 additions
and
17 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
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