Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sometimes ORA-06512, sometimes the original exception itself

user8704911Sep 17 2015 — edited Sep 22 2015

My C++ application invokes some PL/SQL function (via OCI), which might throw an oracle exception.

But i am confronted with different behavior for the same situation.

Sometimes my application receives the original oracle exception (ORA-20000 plus additional information).

But sometimes i get ORA-06512 instead - which is legal, because the oracle exception was propagated out of the PL/SQL context.

But why only sometimes?

I hit this because the exception handling in C++ was different for ORA-20000 vs. other exceptions (e.g. ORA-06512).

I can align this.

But i would like to know, why i don't get ORA-06512 always.

best regards,
Frank

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2015
Added on Sep 17 2015
11 comments
1,749 views