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!

Get raise_application_error messages from errorstack?

Charles LeeMay 15 2017 — edited May 15 2017

If I do a raise_application_error in one place of my program (DB backend), can I somehow retrieve this error through some errorstack in another part of my program (Forms application)?

For clarity, this is about a password_verify_function triggered by a DDL-statement to 'alter user'. It does all kinds of checks on the password and raises application error when the new password is at fault:

      raise_application_error(-20001, 'This is a testerror');

The calling form (QMS0004F) does a 'forms_ddl'-call to do the 'alter user', which only returns a true or false boolean indicating the DDL statement either succeeded or failed. When false, I'd like to retreive the error and present it to the user. (I Don't necesarilly need a stacktrace, I just want to display the error and perhaps the errorcode.)

I tried some methods to get messages from the errorstack, like cg$errors.get_error_messages(), cg$errors.geterrors() and cg$errors.pop(), to no avail yet...

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2017
Added on May 15 2017
1 comment
444 views