Subject Commit-error: showing the statement / record, which is causing the error

I'm working on some import functionality and prepare an IB_Script with all the required statements which gets executed at the end. The progress and also the errors shall be logged.

Some errors like not matching column count etc. do occur on execute of the script already and it's possible to access the error causing statement with the help of the IB_Script.OnStatement event.

Some other errors occur only during the commit (for instance violations of foreign key constraints) is there a way to access not only the general errormessage, but also the SQL statement causing the error?  I.e. the statement / the recod with the wrong value.

IB_Transaction.Statements seem to differ from the statements of the IB_Script and other than that I don't see anything, which might help to achieve this.

Best regards,