Package ej.microui

Class MicroUIException

  • All Implemented Interfaces:
    Serializable

    public class MicroUIException
    extends RuntimeException
    Thrown to indicate that a method has caused an internal MicroUI error. This error is specified by an identifier and this identifier can be retrieved calling getErrorCode().
    See Also:
    Serialized Form
    • Field Detail

      • GENERIC_EVENT_GENERATOR_INVALID_CLASSNAME

        public static final int GENERIC_EVENT_GENERATOR_INVALID_CLASSNAME
        Exception thrown when generic event generator classname is unknown. Please check your classpath to add the expected class.

        Value -2 is assigned to GENERIC_EVENT_GENERATOR_INVALID_CLASSNAME.

        See Also:
        Constant Field Values
      • RESOURCE_INVALID_PATH

        public static final int RESOURCE_INVALID_PATH
        Exception thrown when a resource cannot be retrieved. Path must be relative to the application classpath and starts with '/'.

        Value -4 is assigned to RESOURCE_INVALID_PATH.

        See Also:
        Constant Field Values
      • RESOURCE_INVALID_FILE

        public static final int RESOURCE_INVALID_FILE
        Exception thrown when the resource content cannot be read for any reason.

        Value -5 is assigned to RESOURCE_INVALID_FILE.

        See Also:
        Constant Field Values
      • RESOURCE_CLOSED

        public static final int RESOURCE_CLOSED
        Exception thrown when the application is trying to use a resource which has been closed.

        Value -6 is assigned to RESOURCE_CLOSED.

        See Also:
        Constant Field Values
      • IMAGE_OUT_OF_MEMORY

        public static final int IMAGE_OUT_OF_MEMORY
        Exception thrown when there is not enough space in images heap when creating a new image.

        Value -7 is assigned to IMAGE_OUT_OF_MEMORY.

        See Also:
        Constant Field Values
      • IMAGE_UNKNOWN_FORMAT

        public static final int IMAGE_UNKNOWN_FORMAT
        Exception thrown when the image cannot be decoded because there is no runtime decoder able to decode this kind of image.

        Value -8 is assigned to IMAGE_UNKNOWN_FORMAT.

        See Also:
        Constant Field Values
      • OUT_OF_EVENTS

        public static final int OUT_OF_EVENTS
        Exception thrown when Display's event serializer queue is full. The new event cannot be added to this queue. Review the queue size or decrease the number of events added to this queue.

        Value -9 is assigned to OUT_OF_EVENTS.

        See Also:
        Constant Field Values
      • NO_DISPLAY

        public static final int NO_DISPLAY
        Exception thrown when the application tries to get a Display whereas there is no Display on the platform.

        Value -10 is assigned to NO_DISPLAY.

        See Also:
        Constant Field Values
      • NO_FONT

        public static final int NO_FONT
        Exception thrown when the application tries to get a Font whereas there is no Font on the platform.

        Value -11 is assigned to NO_FONT.

        See Also:
        Constant Field Values
      • DRAWING_ERROR

        public static final int DRAWING_ERROR
        Exception thrown if the error flag was set during a drawing operation. The check is performed when the screen is flushed or when explicitly requested.

        Value -13 is assigned to DRAWING_ERROR.

        See Also:
        Constant Field Values
      • IMAGE_UNSUPPORTED_FORMAT

        public static final int IMAGE_UNSUPPORTED_FORMAT
        Exception thrown if the format is not supported when creating an image or graphics context.

        Value -14 is assigned to IMAGE_UNSUPPORTED_FORMAT.

        See Also:
        BufferedImage(int, int, Format), Constant Field Values
    • Constructor Detail

      • MicroUIException

        public MicroUIException​(int errorCode)
        Constructs an exception with the specified error code.
        Parameters:
        errorCode - the exception error code
    • Method Detail

      • getErrorCode

        public int getErrorCode()
        Gets the reason why the exception has been thrown.
        Returns:
        the exception error code