Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How can I interpert error codes returned in PLSQL procedure?
stanb_at_panix.com (Stan Brown) wrote in message news:<9u3187$cc0$1_at_panix1.panix.com>...
> Once upon a time in a universe far away, I knew this, but now I jave
> forgotten :-)
>
> I'm trying to get a PLSQL procdure that I used several years agao to study
> some things about indexes to run on my nice new Oracle server. There are
> several things that are different about the new one (7.3.4.5 if it matters,
> so I;m certain that my problem has to do with that.
>
> The real dificulty lies in the fact that I can't interpet the error code
> the procedure is returning. Like a good little programer, I did put in a
> catch all exception hadnler, and it's being trigered. But to use oerr to
> give me the text, I need to now the prefix as well as the error code :-(
>
> How can I figure this out?
>
> Here is teh message I'm getting:
>
> Other Exception -947 c_table_name B100 v_table_name B100
>
> And it's being generated by this peice of code:
>
> DBMS_OUTPUT.PUT_LINE('Other Exception ' || error_code || ' c_table_n
> ame ' || c_table_name || ' v_table_name ' || c_table_name);
>
> Thanks for re-educating me on this!
Under the assumption that you set error_code to the value in SQLCODE then it would be an ORA error, as in ORA-00947:
$ oerr ora 00947
00947, 00000, "not enough values"
// *Cause:
// *Action: