For monitoring my PL/SQL code I have an exception log table. Any PL/SQL block has an exception handler that inserts a record with the exception string into this table, even the functions. Of course this doesn't work with the functions if they are called by a select statement.
I tried to avoid any DML, so I saved the exception string to a session variable. That works but I can't find a solution to insert the variable string into my exception log. I hope someone has a good idea or hint about that topic.