You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there are a lot of force-unwraps of optionals in the codebase. For example, SVGParser contains a few unchecked force-unwraps that can result in a crash for non-ideal SVGs. We had a chance to experience these crashes.
Would you be open to removing these force-unwraps?
It also seems it is more prevalent use x != nil ... x! instead of using if let or guard let.
Would you accept a pull request that addresses the force-unwraps and replaces them with safer options (errors, logging, fallbacks)?
The text was updated successfully, but these errors were encountered:
That's definitely a must-have parser improvement. I'd like to use logger during parsing and provide different methods in SVGParser:
Safe parse which ignores all errors and return what it can get.
Usual parse which throws error when something logged.
Provide Logger as an argument to handle all cases on your own.
I'd be happy to accept such a pull request. There are probably a lot of work, so it makes sense to split it to different PRs. Also we need to keep backward compatibility, so existing API should work as before (except logging to console, this should be avoided no doubt).
Currently, there are a lot of force-unwraps of optionals in the codebase. For example, SVGParser contains a few unchecked force-unwraps that can result in a crash for non-ideal SVGs. We had a chance to experience these crashes.
Would you be open to removing these force-unwraps?
It also seems it is more prevalent use
x != nil
...x!
instead of usingif let
orguard let
.Would you accept a pull request that addresses the force-unwraps and replaces them with safer options (errors, logging, fallbacks)?
The text was updated successfully, but these errors were encountered: