|Subject||Catching errors and continue processing|
I have a procedure that recalculates financial instrument (10 000+). This operation takes 4-6 hours and an occasional exception can occur in one of these instruments (eg E_MISSING_CURRENCYRATE)
-I do not want that exception to prevent the rest of the instruments to be recalculated (primary).
-I would like the error written ta a log if possible (secondary)
WHEN ANY DO
IN AUTONOMOUS TRANSACTION DO
INSERT INTO LN_PLAN_ERRORS (LOAN_ID, ERRORDATE, MSG)
VALUES (:ID, CURRENT_TIMESTAMP.....
but it isnt behaving as you might expect (though in line with documentation) since it stops execution en rolls back the transaction even if I am not rethrowing the exception.
Can I get what I want?