while matching, ignore exceptions thrown by cast_to constructors