com.io7m.jpra.compiler.core.checker

## Class JPRACompilerCheckerException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.io7m.jpra.core.JPRAException
      - - com.io7m.jpra.compiler.core.JPRACompilerException
        - - com.io7m.jpra.compiler.core.checker.JPRACompilerCheckerException

- All Implemented Interfaces:
    Serializable

      public final class JPRACompilerCheckerException
      extends JPRACompilerException

  The type of exceptions raised during checking.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JPRACompilerCheckerException(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> in_lex, JPRACheckerErrorCode in_code, Exception e)` Construct an exception.
    `JPRACompilerCheckerException(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> in_lex, JPRACheckerErrorCode in_code, String message)` Construct an exception.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JPRACompilerCheckerException` | `booleanSetSizeInvalid(TypeExprBooleanSet<IdentifierType,Untyped> e, com.io7m.jranges.RangeInclusiveB range, BigInteger value)`
    `static JPRACompilerCheckerException` | `booleanSetSizeLessThanRequired(TypeExprBooleanSet<IdentifierType,Untyped> e, BigInteger required, BigInteger value)`
    `static JPRACompilerCheckerException` | `floatSizeNotSupported(TypeExprFloat<IdentifierType,Untyped> e, Size<SizeUnitBitsType> size, com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> sizes)`
    `JPRACheckerErrorCode` | `getErrorCode()`
    `static <T extends SizeUnitType> JPRACompilerCheckerException` | `integerSizeNotSupported(TypeExprType<IdentifierType,Untyped> e, Size<T> size, com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> sizes)`
    `static JPRACompilerCheckerException` | `matrixFloatSizeNotSupported(TFloat e, BigInteger size, com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)`
    `static JPRACompilerCheckerException` | `matrixIntegerSizeNotSupported(TIntegerType e, BigInteger size, com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)`
    `static JPRACompilerCheckerException` | `matrixNonScalarElement(TypeExprMatrix<IdentifierType,Untyped> e)`
    `static JPRACompilerCheckerException` | `matrixNotSupported(TypeExprMatrix<IdentifierType,Untyped> e, BigInteger tw, BigInteger th, com.gs.collections.api.list.ImmutableList<com.io7m.jfunctional.Pair<com.io7m.jranges.RangeInclusiveB,com.io7m.jranges.RangeInclusiveB>> supported)`
    `static JPRACompilerCheckerException` | `packedNonIntegerType(PackedFieldDeclValue<IdentifierType,Untyped> r, TypeExprType<IdentifierType,TType> rvt)`
    `static JPRACompilerCheckerException` | `packedSizeNotSupported(TypeName name, BigInteger size, com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)`
    `static JPRACompilerCheckerException` | `paddingSizeInvalid(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> lex, BigInteger value)` The size of a padding field was invalid.
    `static JPRACompilerCheckerException` | `stringEncodingNotSupported(TypeExprString<IdentifierType,Untyped> e, String encoding, com.gs.collections.api.set.ImmutableSet<String> encodings)`
    `static JPRACompilerCheckerException` | `vectorFloatSizeNotSupported(TFloat e, BigInteger size, com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)`
    `static JPRACompilerCheckerException` | `vectorIntegerSizeNotSupported(TIntegerType e, BigInteger size, com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)`
    `static JPRACompilerCheckerException` | `vectorNonScalarElement(TypeExprVector<IdentifierType,Untyped> e)`
    `static JPRACompilerCheckerException` | `vectorSizeNotSupported(TypeExprVector<IdentifierType,Untyped> e, BigInteger size, com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)`

    - ### Methods inherited from class com.io7m.jpra.compiler.core.JPRACompilerException

      `getLexicalInformation`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### JPRACompilerCheckerException

          public JPRACompilerCheckerException(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> in_lex,
                                              JPRACheckerErrorCode in_code,
                                              String message)

      Construct an exception.
      Parameters:
        `in_lex` - Lexical information, if any
        `in_code` - The error code
        `message` - The exception message

    - #### JPRACompilerCheckerException

          public JPRACompilerCheckerException(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> in_lex,
                                              JPRACheckerErrorCode in_code,
                                              Exception e)

      Construct an exception.
      Parameters:
        `in_lex` - Lexical information, if any
        `in_code` - The error code
        `e` - The cause

  - ### Method Detail

    - #### integerSizeNotSupported

          public static <T extends SizeUnitType> JPRACompilerCheckerException integerSizeNotSupported(TypeExprType<IdentifierType,Untyped> e,
                                                                                                      Size<T> size,
                                                                                                      com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> sizes)

      Type Parameters:
        `T` - The precise type of size units
      Parameters:
        `e` - The expression
        `size` - The size
        `sizes` - The supported sizes
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.RECORD_INTEGER_SIZE_UNSUPPORTED`

    - #### floatSizeNotSupported

          public static JPRACompilerCheckerException floatSizeNotSupported(TypeExprFloat<IdentifierType,Untyped> e,
                                                                           Size<SizeUnitBitsType> size,
                                                                           com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> sizes)

      Parameters:
        `e` - The expression
        `size` - The size
        `sizes` - The supported sizes
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.RECORD_FLOAT_SIZE_UNSUPPORTED`

    - #### stringEncodingNotSupported

          public static JPRACompilerCheckerException stringEncodingNotSupported(TypeExprString<IdentifierType,Untyped> e,
                                                                                String encoding,
                                                                                com.gs.collections.api.set.ImmutableSet<String> encodings)

      Parameters:
        `e` - The expression
        `encoding` - The string encoding
        `encodings` - The supported encodings
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.STRING_ENCODING_UNSUPPORTED`

    - #### booleanSetSizeInvalid

          public static JPRACompilerCheckerException booleanSetSizeInvalid(TypeExprBooleanSet<IdentifierType,Untyped> e,
                                                                           com.io7m.jranges.RangeInclusiveB range,
                                                                           BigInteger value)

      Parameters:
        `e` - The expression
        `range` - The valid size range
        `value` - The size
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.BOOLEAN_SET_SIZE_INVALID`

    - #### booleanSetSizeLessThanRequired

          public static JPRACompilerCheckerException booleanSetSizeLessThanRequired(TypeExprBooleanSet<IdentifierType,Untyped> e,
                                                                                    BigInteger required,
                                                                                    BigInteger value)

      Parameters:
        `e` - The expression
        `required` - The required space
        `value` - The size
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.BOOLEAN_SET_SIZE_TOO_SMALL`

    - #### vectorSizeNotSupported

          public static JPRACompilerCheckerException vectorSizeNotSupported(TypeExprVector<IdentifierType,Untyped> e,
                                                                            BigInteger size,
                                                                            com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)

      Parameters:
        `e` - The expression
        `size` - The size
        `supported` - The supported sizes
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.VECTOR_SIZE_UNSUPPORTED`

    - #### vectorNonScalarElement

          public static JPRACompilerCheckerException vectorNonScalarElement(TypeExprVector<IdentifierType,Untyped> e)

      Parameters:
        `e` - The expression
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.VECTOR_NON_SCALAR_TYPE`

    - #### vectorIntegerSizeNotSupported

          public static JPRACompilerCheckerException vectorIntegerSizeNotSupported(TIntegerType e,
                                                                                   BigInteger size,
                                                                                   com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)

      Parameters:
        `e` - The expression
        `size` - The size
        `supported` - The supported sizes
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.VECTOR_SIZE_INTEGER_UNSUPPORTED`

    - #### vectorFloatSizeNotSupported

          public static JPRACompilerCheckerException vectorFloatSizeNotSupported(TFloat e,
                                                                                 BigInteger size,
                                                                                 com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)

      Parameters:
        `e` - The expression
        `size` - The size
        `supported` - The supported sizes
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.VECTOR_SIZE_FLOAT_UNSUPPORTED`

    - #### matrixNotSupported

          public static JPRACompilerCheckerException matrixNotSupported(TypeExprMatrix<IdentifierType,Untyped> e,
                                                                        BigInteger tw,
                                                                        BigInteger th,
                                                                        com.gs.collections.api.list.ImmutableList<com.io7m.jfunctional.Pair<com.io7m.jranges.RangeInclusiveB,com.io7m.jranges.RangeInclusiveB>> supported)

      Parameters:
        `e` - The expression
        `tw` - The width
        `th` - The height
        `supported` - The supported sizes
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.MATRIX_SIZE_UNSUPPORTED`

    - #### matrixNonScalarElement

          public static JPRACompilerCheckerException matrixNonScalarElement(TypeExprMatrix<IdentifierType,Untyped> e)

      Parameters:
        `e` - The expression
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.MATRIX_NON_SCALAR_TYPE`

    - #### matrixFloatSizeNotSupported

          public static JPRACompilerCheckerException matrixFloatSizeNotSupported(TFloat e,
                                                                                 BigInteger size,
                                                                                 com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)

      Parameters:
        `e` - The expression
        `size` - The size
        `supported` - The supported sizes
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.MATRIX_SIZE_FLOAT_UNSUPPORTED`

    - #### matrixIntegerSizeNotSupported

          public static JPRACompilerCheckerException matrixIntegerSizeNotSupported(TIntegerType e,
                                                                                   BigInteger size,
                                                                                   com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)

      Parameters:
        `e` - The expression
        `size` - The size
        `supported` - The supported sizes
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.MATRIX_SIZE_INTEGER_UNSUPPORTED`

    - #### paddingSizeInvalid

          public static JPRACompilerCheckerException paddingSizeInvalid(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> lex,
                                                                        BigInteger value)

      The size of a padding field was invalid.
      Parameters:
        `lex` - Lexical information
        `value` - The size value
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.PADDING_SIZE_INVALID`

    - #### packedNonIntegerType

          public static JPRACompilerCheckerException packedNonIntegerType(PackedFieldDeclValue<IdentifierType,Untyped> r,
                                                                          TypeExprType<IdentifierType,TType> rvt)

      Parameters:
        `r` - The field declaration
        `rvt` - The type expression
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.PACKED_NON_INTEGER`

    - #### packedSizeNotSupported

          public static JPRACompilerCheckerException packedSizeNotSupported(TypeName name,
                                                                            BigInteger size,
                                                                            com.gs.collections.api.list.ImmutableList<com.io7m.jranges.RangeInclusiveB> supported)

      Parameters:
        `name` - The type name
        `size` - The size in bits
        `supported` - The supported sizes
      Returns:
        An exception
      See Also:
        `JPRACheckerErrorCode.PACKED_SIZE_NOT_SUPPORTED`

    - #### getErrorCode

          public JPRACheckerErrorCode getErrorCode()

      Returns:
        The error code

Copyright © 2015 <code@io7m.com> http://io7m.com