Class BindingError

java.lang.Object
tech.guilhermekaua.spigotboot.config.binding.BindingError

public final class BindingError extends Object
Represents an error that occurred during config binding.
  • Constructor Details

    • BindingError

      public BindingError(@NotNull @NotNull PropertyPath path, @NotNull @NotNull String field, @NotNull @NotNull String message, @Nullable @Nullable Throwable cause)
      Creates a new binding error.
      Parameters:
      path - the config path where the error occurred
      field - the field name
      message - the error message
      cause - the underlying cause, or null
  • Method Details

    • getPath

      @NotNull public @NotNull PropertyPath getPath()
      Gets the config path.
      Returns:
      the path
    • getField

      @NotNull public @NotNull String getField()
      Gets the field name.
      Returns:
      the field name
    • getMessage

      @NotNull public @NotNull String getMessage()
      Gets the error message.
      Returns:
      the message
    • getCause

      @Nullable public @Nullable Throwable getCause()
      Gets the underlying cause.
      Returns:
      the cause, or null
    • format

      @NotNull public @NotNull String format()
      Formats this error for display.
      Returns:
      the formatted error
    • toString

      public String toString()
      Overrides:
      toString in class Object