You can read about the concepts behind event handlers in the user manual.
You can only have one event handler per type per Test Case. What you are trying to do sounds like an excellent candidate for making a separate Test Case that contains step and the event handler, then reusing this Test Case wherever you need it.
I got what you are saying, I created two test cases that I called "Check if X page reached" "Check if y page reached" and they only have the "ub_ctx_checkText" action in them with an event handler for each that in case of a failure will click "next" and in case its good it will simply continue with the test.
(I am writing this long reply for future users that might search this up when trying to figure out how to do this )
Glad it's working One tip - do you really need *two* separate Test Cases? If they do the same thing, then one Test Case should be enough - you can parametrize the data you want to check, and "reassign" the component names so the same Test Case can deal with different data and components when you reuse it