Package ej.microvg

Class VectorGraphicsException

  • All Implemented Interfaces:
    Serializable

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

      • IMAGE_INVALID_PATH

        public static final int IMAGE_INVALID_PATH
        Exception thrown when an image cannot be retrieved. Path must be relative to the application classpath and starts with '/'.

        Value -1 is assigned to IMAGE_INVALID_PATH.

        See Also:
        Constant Field Values
      • IMAGE_INVALID

        public static final int IMAGE_INVALID
        Exception thrown when an image cannot be drawn.

        Value -2 is assigned to IMAGE_INVALID.

        See Also:
        Constant Field Values
      • IMAGE_OVERLAPPING_ELEMENTS

        public static final int IMAGE_OVERLAPPING_ELEMENTS
        Exception thrown when an image with overlapping elements is drawn or filtered with a transparent alpha.

        Value -3 is assigned to IMAGE_OVERLAPPING_ELEMENTS.

        See Also:
        Constant Field Values
      • FONT_INVALID_PATH

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

        Value -4 is assigned to FONT_INVALID_PATH.

        See Also:
        Constant Field Values
      • FONT_INVALID

        public static final int FONT_INVALID
        Exception thrown when a font cannot be loaded.

        Value -5 is assigned to FONT_INVALID.

        See Also:
        Constant Field Values
      • RESOURCE_CLOSED

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

        Value -6 is assigned to RESOURCE_CLOSED.

        See Also:
        Constant Field Values
      • IMAGE_PARSING_ERROR

        public static final int IMAGE_PARSING_ERROR
        Exception thrown when an image could not be loaded because of a parsing error.

        Value -7 is assigned to IMAGE_PARSING_ERROR.

        See Also:
        Constant Field Values
      • NO_COMPLEX_LAYOUTER_ERROR

        public static final int NO_COMPLEX_LAYOUTER_ERROR
        Exception thrown when a font is loaded with complex text layout enabled but no complex layouter is available.

        Value -8 is assigned to NO_COMPLEX_LAYOUTER_ERROR.

        See Also:
        Constant Field Values
      • OUT_OF_MEMORY

        public static final int OUT_OF_MEMORY
        Exception thrown when an out of memory error occurs.

        Value -9 is assigned to OUT_OF_MEMORY.

        See Also:
        Constant Field Values
    • Constructor Detail

      • VectorGraphicsException

        public VectorGraphicsException​(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