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

Make error handling in XMLDecoder simpler & safer #41

Merged
merged 2 commits into from Dec 23, 2018
Merged

Make error handling in XMLDecoder simpler & safer #41

merged 2 commits into from Dec 23, 2018

Conversation

regexident
Copy link
Contributor

There were way too many functions returning throw -> _? in XMLDecoder, which should only ever return throw -> _ (turning the nil case into an error of its own).

πŸ‘·πŸ»β€β™€οΈ I also managed to get rid of quite a bunch of force-unwraps.
Especially the ones eventually leading to crashes in #38 and #34. πŸ’₯

@codecov
Copy link

codecov bot commented Dec 23, 2018

Codecov Report

Merging #41 into master will decrease coverage by 0.04%.
The diff coverage is 56.6%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #41      +/-   ##
==========================================
- Coverage   51.46%   51.41%   -0.05%     
==========================================
  Files          29       29              
  Lines        1399     1412      +13     
==========================================
+ Hits          720      726       +6     
- Misses        679      686       +7
Impacted Files Coverage Ξ”
Sources/XMLCoder/Decoder/XMLDecoder.swift 39.81% <53.19%> (+0.92%) ⬆️
Sources/XMLCoder/Decoder/XMLDecodingStorage.swift 72.72% <83.33%> (-9.1%) ⬇️

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 4cad2df...b752e0d. Read the comment docs.

@MaxDesiatov MaxDesiatov merged commit 3d22e01 into CoreOffice:master Dec 23, 2018
@regexident regexident deleted the fix/decoding-safety branch December 23, 2018 21:25
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.

None yet

2 participants