Creating an error handling
Since APEX 4.1, it is possible to create a custom error handling. With the custom error handling, you can not only control error messages but also the location of the message. It is also possible to log the errors. In this recipe we will show you how to create an error handling function and how to use it in APEX. We will use a form based on the EMP
table. When the user enters erroneous data and clicks on the Submit button, an error message will be displayed along the concerned text item and the error will be logged in to an error table. However, when the user enters a hire date in an invalid format, the error will be logged and an error message will be displayed in the Notification area (in the upper part of the screen).
Getting ready
Make sure you have access to the EMP
and APP_ERROR_LOG
tables. Create a form based on the EMP
table. Just follow the Create wizard and use the default settings.
How to do it…
Perform the following steps:
Create the following function....