Skip to Main Content

APEX

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!

Ignoring update to application item that does not exist

Scott WesleyOct 5 2020

If I were to use apex_util.set_session_state on an application item that doesn't exist, an exception is raised - as expected.
But I tried to catch that exception with a dirty 'when others', to then ignore it:

begin
 apex_util.set_session_state('DOES_NOT_EXIST','No');
exception when others then
 logger.log('app item does not exist in app'||v('APP_ID'), 'test_case');
end;

but APEX still complained
NATIVE_EXECUTE_PLSQL_CODE ~ APEX_APPLICATION_PAGE_DA_ACTS ~ ERR-1002 Unable to find item ID for item "DOES_NOT_EXIST" in application "124"
I see the same complaint when I use
:DOES_NOT_EXIST := 'No';
The apex_custom_auth.application_page_item_exists function is only specific to page items, and I was hoping not to query each time - just catch a rare exception.
Is this something that can be caught?
Current on 19.2

Comments
Post Details
Added on Oct 5 2020
1 comment
376 views