Class FindFailed

  • All Implemented Interfaces:
    Serializable

    public class FindFailed
    extends SikuliException
    SikuliX FindFailed exception
    constants and settings for the features
    FindFailedResponse
    FindFailedHandler
    ImageMissingHandler
    See Also:
    Serialized Form
    • Field Detail

      • PROMPT

        public static final FindFailedResponse PROMPT
        FindFailedResponse PROMPT: should display a prompt dialog with the failing image having the options retry, skip and abort
      • RETRY

        public static final FindFailedResponse RETRY
        FindFailedResponse RETRY: should retry the find op on FindFailed
      • SKIP

        public static final FindFailedResponse SKIP
        FindFailedResponse SKIP: should silently continue on FindFailed
      • ABORT

        public static final FindFailedResponse ABORT
        FindFailedResponse ABORT: should abort the SikuliX application
    • Constructor Detail

      • FindFailed

        public FindFailed​(String message)
        the exception
        Parameters:
        message - to be shown
    • Method Detail

      • reset

        public static void reset()
        reset all: response ABORT, findFailedHandler null, imageMissingHandler null
      • setResponse

        public static void setResponse​(FindFailedResponse response)
        Global FindFailedResponse for new Regions
        ABORT - abort script on FindFailed
        SKIP - ignore FindFailed
        PROMPT - display prompt on FindFailed to let user decide how to proceed
        RETRY - continue to wait for appearence after FindFailed
        HANDLE - (set implicit) call a handler on exception setFindFailedHandler(Object)
        default: ABORT
        Parameters:
        response - FindFailed
      • setFindFailedHandler

        public static void setFindFailedHandler​(Object handler)
        Global FindFailedHandler for new Regions
        default: none
        Parameters:
        handler - ObserverCallBack
      • resetFindFailedHandler

        public static void resetFindFailedHandler()
        reset to default: no handler, response ABORT
      • getFindFailedHandler

        public static Object getFindFailedHandler()
        Returns:
        the current handler
      • setImageMissingHandler

        public static void setImageMissingHandler​(Object handler)
        Global ImageMissingHandler for new Regions
        default: none
        Parameters:
        handler - ObserverCallBack
      • resetImageMissingHandler

        public static void resetImageMissingHandler()
        reset to default: no handler
      • getImageMissingHandler

        public static Object getImageMissingHandler()
        Returns:
        the current handler
      • createErrorMessage

        public static String createErrorMessage​(Region reg,
                                                Image img)