Class FindFailed

  • All Implemented Interfaces:
    java.io.Serializable

    public class FindFailed
    extends org.sikuli.script.SikuliException
    SikuliX FindFailed exception
    constants and settings for the features
    FindFailedResponse
    FindFailedHandler
    ImageMissingHandler
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.sikuli.script.FindFailedResponse ABORT
      FindFailedResponse ABORT: should abort the SikuliX application
      static org.sikuli.script.FindFailedResponse HANDLE
      FindFailedResponse HANDLE: should call a handler setFindFailedHandler(Object) on FindFailed
      static org.sikuli.script.FindFailedResponse PROMPT
      FindFailedResponse PROMPT: should display a prompt dialog with the failing image having the options retry, skip and abort
      static org.sikuli.script.FindFailedResponse RETRY
      FindFailedResponse RETRY: should retry the find op on FindFailed
      static org.sikuli.script.FindFailedResponse SKIP
      FindFailedResponse SKIP: should silently continue on FindFailed
    • Constructor Summary

      Constructors 
      Constructor Description
      FindFailed​(java.lang.String message)
      the exception
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String createErrorMessage​(Region reg, Image img)  
      static java.lang.Object getFindFailedHandler()  
      static java.lang.Object getImageMissingHandler()  
      static org.sikuli.script.FindFailedResponse getResponse()  
      static void reset()
      reset all: response ABORT, findFailedHandler null, imageMissingHandler null
      static void resetFindFailedHandler()
      reset to default: no handler, response ABORT
      static void resetImageMissingHandler()
      reset to default: no handler
      static void resetResponse()
      static void setFindFailedHandler​(java.lang.Object handler)
      Global FindFailedHandler for new Regions
      default: none
      static void setImageMissingHandler​(java.lang.Object handler)
      Global ImageMissingHandler for new Regions
      default: none
      static void setResponse​(org.sikuli.script.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
      • Methods inherited from class org.sikuli.script.SikuliException

        toString, toStringShort
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • PROMPT

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

        public static final org.sikuli.script.FindFailedResponse RETRY
        FindFailedResponse RETRY: should retry the find op on FindFailed
      • SKIP

        public static final org.sikuli.script.FindFailedResponse SKIP
        FindFailedResponse SKIP: should silently continue on FindFailed
      • ABORT

        public static final org.sikuli.script.FindFailedResponse ABORT
        FindFailedResponse ABORT: should abort the SikuliX application
      • HANDLE

        public static final org.sikuli.script.FindFailedResponse HANDLE
        FindFailedResponse HANDLE: should call a handler setFindFailedHandler(Object) on FindFailed
    • Constructor Detail

      • FindFailed

        public FindFailed​(java.lang.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​(org.sikuli.script.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​(java.lang.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 java.lang.Object getFindFailedHandler()
        Returns:
        the current handler
      • setImageMissingHandler

        public static void setImageMissingHandler​(java.lang.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 java.lang.Object getImageMissingHandler()
        Returns:
        the current handler
      • createErrorMessage

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