catch exceptions thrown by Poly2Tri