Module io.jooby

Class MissingValueException

All Implemented Interfaces:
Serializable

public class MissingValueException extends BadRequestException
Missing exception. Used when a required attribute/value is missing.
Since:
2.0.0
Author:
edgar
See Also:
  • Constructor Details

    • MissingValueException

      public MissingValueException(@NonNull String name)
      Creates a missing exception.
      Parameters:
      name - Parameter/attribute name.
  • Method Details

    • getName

      public String getName()
      Parameter/attribute name.
      Returns:
      Parameter/attribute name.
    • requireNonNull

      public static <T> T requireNonNull(@NonNull String name, @Nullable T value)
      Check if the given value is null and throw a MissingValueException exception.
      Type Parameters:
      T - Value type.
      Parameters:
      name - Attribute's name.
      value - Value to check.
      Returns:
      Input value