Instead of crashing the entire app, this PR turns those cases into thrown errors. Now the calling app can chose what to do in these cases.
Note: These are all internal parsing code errors, so ideally these will not happen unless the parsing code itself is broken. But either way it is more friendly in this case to throw a catchable error rather than crashing.
This will also close #258 with a more robust fix than #259.
Marking with do not merge for now until we create a Xcode 9 / Swift 3.2 release and also depends on #267 .
Instead of crashing the entire app, this PR turns those cases into thrown errors. Now the calling app can chose what to do in these cases.
Note: These are all internal parsing code errors, so ideally these will not happen unless the parsing code itself is broken. But either way it is more friendly in this case to throw a catchable error rather than crashing.
This will also close #258 with a more robust fix than #259.
Marking with do not merge for now until we create a Xcode 9 / Swift 3.2 release and also depends on #267 .