Class ConversionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.ultikits.ultitools.config.convert.ConversionException
All Implemented Interfaces:
Serializable

public class ConversionException extends Exception
Checked conversion failure carrying the file, whole key path, and declared Java type.
Since:
6.3.0
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • file

      private final String file
    • path

      private final List<String> path
    • declaredType

      private final Type declaredType
    • reason

      private final String reason
  • Constructor Details

    • ConversionException

      public ConversionException(String message, String file, List<String> path, Type declaredType)
      Creates a conversion failure at the given location.
      Parameters:
      message - the reason
      file - the module-relative file
      path - the whole key segments
      declaredType - the declared Java type
    • ConversionException

      public ConversionException(String message, String file, List<String> path, Type declaredType, Throwable cause)
      Creates a conversion failure with its underlying cause.
      Parameters:
      message - the reason
      file - the module-relative file
      path - the whole key segments
      declaredType - the declared Java type
      cause - the underlying failure
  • Method Details

    • file

      public String file()
      Returns:
      the configuration file
    • path

      public List<String> path()
      Returns:
      the immutable whole key path
    • declaredType

      public Type declaredType()
      Returns:
      the declared Java type
    • reason

      public String reason()
      The reason exactly as the converter gave it, without the location prefix of Throwable.getMessage(). The framework shows it in the operator's skip warning (#590).
      Returns:
      the reason, or null when none was given