-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add explanation to info exception. #236
Conversation
The comment by linter has nothing to do with this code change. |
Codecov Report
@@ Coverage Diff @@
## master #236 +/- ##
==========================================
- Coverage 88.75% 88.73% -0.03%
==========================================
Files 76 76
Lines 6298 6301 +3
Branches 436 436
==========================================
+ Hits 5590 5591 +1
- Misses 272 274 +2
Partials 436 436
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the change 👍
src/cljam/io/vcf/util.clj
Outdated
(when-not (parser-map k) | ||
(throw (ex-info (str "Undeclared INFO, " k ".") | ||
{:info ss}))) | ||
[(keyword k) ((parser-map k) vs)]))))))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(when-not (parser-map k) | |
(throw (ex-info (str "Undeclared INFO, " k ".") | |
{:info ss}))) | |
[(keyword k) ((parser-map k) vs)]))))))))) | |
(if-let [parser (parser-map k)] | |
[(keyword k) (parser vs)] | |
(throw (ex-info (str "Undeclared INFO, " k ".") | |
{:info ss})))))))))))) |
b68d66e
to
1b5ce57
Compare
1b5ce57
to
51d7fcf
Compare
Thank you , my code was a bit verbose. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM:+1:
I added exception information about which INFO key is the problem to make it easier to understand the exception when reading the VCF, such as missing a reserved INFO key.
I've seen type errors during INFO parsing in the past, but I lost the VCF file that caused it, so I didn't add any other checking features this time.Then I had Cljam read some VCF files (known databases and others) and found no other problems, so I'll do the rest when I find them.