I'm not able to try it at this moment, but I think it's the sequence of commands:
EXCEPTION
WHEN OTHERS THEN
-- First save the message
err_msg := SUBSTR(SQLERRM, 1, 100); -- << as defined above
ROLLBACK;
INSERT INTO db_errors(err_msg) VALUES (err_msg);
commit;
END;




Reply With Quote