We have implemented a global error logger for all SQL Stored procedures and functions. When a procedure/function encounters an SQLEXCEPTION or SQLWARNING, we call a global error logger and execute a GET STACKED DIAGNOSTICS statement. Part of the data we need to have is the procedure name that failed. I am not seeing that in the GET DIAGNOSTICS available return values (ROUTINE_NAME and ROUTINE_SCHEMA are returned conditionally, and I need it always).
We are currently using the QWVRCSTK API, but I would assume that SQL has a method if providing this data. Anyone know how I can do this?