Make corpus alignment exceptions more generic#420
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #420 +/- ##
==========================================
+ Coverage 73.13% 73.14% +0.01%
==========================================
Files 440 439 -1
Lines 36822 36816 -6
Branches 5061 5061
==========================================
Hits 26930 26930
+ Misses 8781 8775 -6
Partials 1111 1111 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Enkidu93
left a comment
There was a problem hiding this comment.
@Enkidu93 reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ddaspit and pmachapman).
src/SIL.Machine/Corpora/CorporaExtensions.cs line 62 at r1 (raw file):
where T : IRow => new ArgumentException( $"Invalid format in {string.Join(", ", refs)}. Mismatched key formats. There may be an extraneous tab, missing ref, or inconsistent use of user-defined refs.",
I think we can make this even more generic. Something as simple as "Unable to align rows with refs: {refs}" would do. The main thing we want to capture with this exception are the refs that we were unable to align with. The details about tabs and user-defined refs is Serval-specific.
ddaspit
left a comment
There was a problem hiding this comment.
@ddaspit reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on pmachapman).
src/SIL.Machine/Corpora/CorporaExtensions.cs line 61 at r1 (raw file):
) where T : IRow => new ArgumentException(
ArgumentException doesn't feel right to me, since the error is not caused by passing an incorrect argument to the called method. InvalidOperationException would probably be more appropriate.
Part of sillsdev/machine.py#283
This change is