@roaminggamer is correct on this point. however i’ll agree with OP that if newOutline() fails to “trace” the image into a valid non-degenerate outline then there ought to be some more “graceful” method of failing rather than awaiting addBody() to generate an _ internal _ error that can’t be trapped with pcall(). (that is, the error must be occurring “inside” corona, and not propagated “outside” to the exposed lua interface of those internals, otherwise pcall could trap it if it were lua).
the imagined conversation you DON’T want to have:
dev: hey corona make me an outline of this image
corona: here ya go, no errors reported
dev: and so i assume it’s now safe to use the outline that YOU created with the rest of YOUR sdk??
corona: well maybe, though it might not be valid
dev: so how can i determine if it’s valid?
corona: try it with addBody() - if it generates a hard non-trappable internal run-time crash, then it was invalid.
dev: isn’t that a bit too late?
cuz generating any type of non-trappable internal error ought to be a no-no. use-cases would include a user-specified arbitrary image or a run-time gesture-generated image or etc, where the outline trace can’t realistically be “validated” in advance.
suggest OP post a simple-as-possible test case (along with an image that reliably reproduces a failed outline trace).