SQLERRM shows nothing
I'm experiencing a strange issue with SQLERRM. I have a package with a procedure in which I have defined an exception handler using WHEN OTHERS. It looks basically like this:
WHEN OTHERS
THEN lv_msg := substr(SQLERRM, 500);
Log_Info(lv_msg);
ln_retcode := 1;
Nothing complicated as such, but my problem is that the lv_msg is always "empty". If I do:
WHEN OTHERS THEN dbms_output.put_line(SQLERRM);
The output shows the error.
I've started using 11g for a couple of months now and I don't remember facing this problem on lower DB versions.
I'm just wondering if I'm losing it or if it's just those times when we miss the obvious!