When I trigger submit on a page, a process is executed that calls a store procedure.
If I use apex_error.add_error to show the errors, where should I put them, inside the store procedure or inside the page process?
Or how else could I show the errors?
You can return the default or custom error messages from the stored procedure, and if any error returns, then show it using the apex_error.add_error procedure in the process in Oracle Apex.
Check the following example:
Return one more parameter as out parameter from your procedure, for example:
The above procedure will handle the error in the exception section and return the error message using the o_error_message out parameter.
Now you have to catch this error message in the Process in Oracle Apex. Below is an example of the process code:
Please test and let me know if any issues.
It worked very well, thanks