Class SerializationException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CoercionFailedException

Exception thrown on errors encountered while using type serializers.
Since:
4.0.0
See Also:
  • Field Details

  • Constructor Details

    • SerializationException

      Create an exception with unknown message and cause.
      Since:
      4.0.0
    • SerializationException

      public SerializationException(String message)
      Create an exception without a cause.
      Parameters:
      message - message with information about the exception
      Since:
      4.0.0
    • SerializationException

      Create an exception with a cause and no additional information.
      Parameters:
      cause - wrapped causing throwable
      Since:
      4.0.0
    • SerializationException

      public SerializationException(Type expectedType, String message)
      Create an exception without a cause.
      Parameters:
      expectedType - declared type being processed
      message - message with information about the exception
      Since:
      4.0.0
    • SerializationException

      public SerializationException(AnnotatedType expectedType, String message)
      Create an exception without a cause.
      Parameters:
      expectedType - declared type being processed
      message - message with information about the exception
      Since:
      4.2.0
    • SerializationException

      public SerializationException(Type expectedType, Throwable cause)
      Create an exception with a cause and no additional information.
      Parameters:
      expectedType - declared type being processed
      cause - wrapped causing throwable
      Since:
      4.0.0
    • SerializationException

      public SerializationException(AnnotatedType expectedType, Throwable cause)
      Create an exception with a cause and no additional information.
      Parameters:
      expectedType - declared type being processed
      cause - wrapped causing throwable
      Since:
      4.2.0
    • SerializationException

      public SerializationException(Type expectedType, String message, Throwable cause)
      Create an exception with message and wrapped cause.
      Parameters:
      expectedType - declared type being processed
      message - informational message
      cause - cause to be wrapped
      Since:
      4.0.0
    • SerializationException

      public SerializationException(AnnotatedType expectedType, String message, Throwable cause)
      Create an exception with message and wrapped cause.
      Parameters:
      expectedType - declared type being processed
      message - informational message
      cause - cause to be wrapped
      Since:
      4.2.0
    • SerializationException

      public SerializationException(ConfigurationNode node, Type expectedType, String message)
      Create an exception with a message and unknown cause.
      Parameters:
      node - node being processed
      message - informational message
      expectedType - declared type being processed
      Since:
      4.0.0
    • SerializationException

      public SerializationException(ConfigurationNode node, AnnotatedType expectedType, String message)
      Create an exception with a message and unknown cause.
      Parameters:
      node - node being processed
      message - informational message
      expectedType - declared type being processed
      Since:
      4.2.0
    • SerializationException

      public SerializationException(ConfigurationNode node, Type expectedType, Throwable cause)
      Create an exception with wrapped cause.
      Parameters:
      node - node being processed
      expectedType - declared type being processed
      cause - cause to be wrapped
      Since:
      4.0.0
    • SerializationException

      public SerializationException(ConfigurationNode node, AnnotatedType expectedType, Throwable cause)
      Create an exception with wrapped cause.
      Parameters:
      node - node being processed
      expectedType - declared type being processed
      cause - cause to be wrapped
      Since:
      4.2.0
    • SerializationException

      public SerializationException(ConfigurationNode node, Type expectedType, @Nullable String message, @Nullable Throwable cause)
      Create an exception with message and wrapped cause.
      Parameters:
      node - node being processed
      expectedType - declared type being processed
      message - informational message
      cause - cause to be wrapped
      Since:
      4.0.0
    • SerializationException

      public SerializationException(ConfigurationNode node, AnnotatedType expectedType, @Nullable String message, @Nullable Throwable cause)
      Create an exception with message and wrapped cause.
      Parameters:
      node - node being processed
      expectedType - declared type being processed
      message - informational message
      cause - cause to be wrapped
      Since:
      4.2.0
    • SerializationException

      public SerializationException(NodePath path, Type expectedType, String message)
      Create an exception with message and wrapped cause.
      Parameters:
      path - path to node being processed
      expectedType - declared type being processed
      message - informational message
      Since:
      4.0.0
    • SerializationException

      public SerializationException(NodePath path, AnnotatedType expectedType, String message)
      Create an exception with message and wrapped cause.
      Parameters:
      path - path to node being processed
      expectedType - declared type being processed
      message - informational message
      Since:
      4.2.0
  • Method Details

    • expectedType

      public @Nullable Type expectedType()
      Get the desired type associated with the failed object mapping operation.
      Returns:
      type
      Since:
      4.0.0
    • getMessage

      public @Nullable String getMessage()
      Description copied from class: ConfigurateException
      Get a description of the location of this error, with path included.
      Overrides:
      getMessage in class ConfigurateException
      Returns:
      message
    • initType

      public void initType(Type type)
      Initialize the expected type.

      If a type has already been set, it will not be overridden.

      Parameters:
      type - expected type
      Since:
      4.0.0
    • initType

      public final void initType(AnnotatedType type)
      Initialize the expected type.

      If a type has already been set, it will not be overridden.

      Parameters:
      type - expected type
      Since:
      4.2.0