I would like to the the old & new rows as XML to an exceptions table when a trigger cannot succeed. I am used to using a generic
EXCEPTION WHEN OTHERS THEN
old_x := dbms_xmlgen.getxml('select * from OLD');
You can't select from
old, and there is no way to access the
old values generically, I'm afraid - you have to specify
old.ename etc. one by one.
Tom Kyte has shown how to generate triggers to overcome this here on asktom.oracle.com.