Function
Page
In a page > Pages Attribute (double click the root node of the page rendering tree) > Error handling.
FUNCTION apex_custom_error (
p_error IN apex_error.t_error )
RETURN apex_error.t_error_result
IS
l_result apex_error.t_error_result;
BEGIN
IF ( p_error.ora_sqlcode = 1403 ) THEN
l_result.message := 'No data was found. Sorry try later';
-- p_error.ora_sqlcode: error raised by (PL/)SQL
-- p_error.ora_sqlerrm, 'original error message
-- p_error.error_backtrace, 'error stack backtrace'
-- p_error.page_item_name, 'Associated page item name'
-- p_error.region_id, 'Associated tabular form region id of the primary application'
-- p_error.column_alias, 'Associated tabular form column alias'
-- p_error.row_num, 'Associated tabular form row'
END IF;
RETURN l_result;
END;
See also example in the doc : Example of an Error Handling Function in the apex_error package doc
Application
API
The APEX_ERROR package provides the interface declarations and some utility functions for an error handling function