After the discussion in https://github.com/exyte/Macaw/issues/732 I went ahead and removed all force unwrapping from SVGParser. Some of it was safe, and it would never crash. Although, I still think it is a bad practice to use it, so I replaced it with other ways Swift has.
Nevertheless, many of these force unwrappings would actually result in a crash if somebody provided a non-ideal SVG.
I have also added some logging, but I guess it requires a bigger overhaul that is beyond my intention at this moment.
Let me know if you would prefer to do something differently.
After the discussion in https://github.com/exyte/Macaw/issues/732 I went ahead and removed all force unwrapping from SVGParser. Some of it was safe, and it would never crash. Although, I still think it is a bad practice to use it, so I replaced it with other ways Swift has.
Nevertheless, many of these force unwrappings would actually result in a crash if somebody provided a non-ideal SVG.
I have also added some logging, but I guess it requires a bigger overhaul that is beyond my intention at this moment.
Let me know if you would prefer to do something differently.