Skip errors when inserting rows

Skip errors when inserting rows

I need to write a Deluge script to insert 10,000 rows into a form from another form. 
How do I skip error rows when "unique key" condition is not met, but continue with the other rows? Thanks.

Also looking for a full Deluge training manual.