PL/SQL (MOSC)

MOSC Banner

SQLERRM shows nothing

edited Mar 11, 2011 6:08AM in PL/SQL (MOSC) 3 commentsAnswered ✓
Dear all,

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!

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center