Skip the service execution to next line when there is an error in the current line
I'm trying to execute a batch of SQL insert queries with multiple data values. I've stored the values (to be inserted) in an Infotable, iterating over the infotable and building the INSERT query statements and then making a call to "RunDatabaseCommand" service of a DB thing.
Ideally, with different set of values the said service inserts the values into the DB.
When one of the multiple values (at the time of iteration) has already exist, the service throws an error (DB error i.e., Primary key violation) - this is expected. However, the service execution stops at the existing entry and doesn't reach the remaining values.
For example - the Infotable values (v1, v2, v3, v4 etc., ) needs to be inserted. These values are iterated, over each iteration the values are being inserted into the DB. Suppose "v2" values already exist in the DB and v3 and v4 values doesn't exist in the DB. At the time iteration execution with v1 value gets inserted. Execution with v2 values throws an error, then the rest of the values i.e., v3 and v4 never gets executed / inserted into the DB.
Here, when the execution reaches v2 value, it should throw an error / warn message, and then the execution should continue with v3 and v4 value insertions. How can I achieve this behaviour??
I've tried putting a TRY / CATCH block around the code which makes a call to RunDatabaseCommand service. But the execution is getting stopped post reaching the existing entry.

