Re: [firebird-support] Exception handling in loop

2013-01-10 Thread Thomas Steinmaurer
I want to select a bunch of items and insert them somewhere else. If the insert fails because of a duplicate primary key or unique constraint, I want to abandon that particular item and continue with the rest. This code outlines my logic. Is this correct for what I'm trying to accomplish?

RE: [firebird-support] Exception handling in loop

2013-01-10 Thread Rick Debay
-support@yahoogroups.com Subject: Re: [firebird-support] Exception handling in loop I want to select a bunch of items and insert them somewhere else. If the insert fails because of a duplicate primary key or unique constraint, I want to abandon that particular item and continue with the rest

Re: [firebird-support] Exception handling in loop

2013-01-10 Thread Thomas Steinmaurer
Since a block wasn't exited before the exception was handled, wouldn't any database statements in the block stand? Assume for a moment that it wasn't a constraint violation, but a table trigger throwing a custom exception, and the catch block handles it instead of handling constraint