Skip to content
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 Optional Error Context #46

Merged
merged 2 commits into from
Dec 30, 2018
Merged

Add Optional Error Context #46

merged 2 commits into from
Dec 30, 2018

Conversation

hodovani
Copy link
Contributor

@hodovani hodovani commented Dec 28, 2018

Add optional length of error context.

Resolves #13
Resolves #3

@hodovani hodovani self-assigned this Dec 28, 2018
@codecov
Copy link

codecov bot commented Dec 30, 2018

Codecov Report

Merging #46 into master will increase coverage by 0.6%.
The diff coverage is 90.24%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #46     +/-   ##
=========================================
+ Coverage    55.4%   56.01%   +0.6%     
=========================================
  Files          29       29             
  Lines        1397     1414     +17     
=========================================
+ Hits          774      792     +18     
+ Misses        623      622      -1
Impacted Files Coverage Δ
Sources/XMLCoder/Encoder/XMLEncoder.swift 47.57% <ø> (ø) ⬆️
Sources/XMLCoder/Decoder/XMLDecoder.swift 38.64% <100%> (-1.17%) ⬇️
Sources/XMLCoder/Box/NullBox.swift 100% <100%> (ø) ⬆️
Sources/XMLCoder/Auxiliaries/XMLStackParser.swift 91.78% <88.88%> (+5.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46925e4...5c38aba. Read the comment docs.

@MaxDesiatov MaxDesiatov merged commit a4954c9 into master Dec 30, 2018
@delete-merged-branch delete-merged-branch bot deleted the report-error-context branch December 30, 2018 12:52
@regexident
Copy link
Contributor

regexident commented Jan 4, 2019

FYI this crashes if errorPosition - offset < 0 or errorPosition + offset > string.length.

And yes, it's missing some test that might have caught these scenarios. 😉

@MaxDesiatov
Copy link
Collaborator

Thanks for reporting @regexident! @hodovani could you please have a look and add corresponding test cases and fixes? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants