27 Jun
2008
27 Jun
'08
2:49 a.m.
On Thu, 2008-06-26 at 12:06 -0500, Bob Jamison wrote:
In any case, bad data should be handled gracefully, not with a killer assertion.
The general rule is to be forgiving on input, strict on output.
It is certainly true that assertions should not be used as tools to validate external input. Instead, the reason we have assertions is to uncover bugs, which is what occurred in this case. The crash was a manifestation of a bug in the elliptical arc curve type, such that it did not correctly handle data permitted by the SVG standard.
As has been demonstrated in this and many other cases, using hard assertions during development is the best way to guarantee that bugs are found and fixed quickly.
-mental