Exception ValidationException (2.1.2)

public class ValidationException extends IllegalArgumentException

Exception thrown if there is a validation problem with a path template, http config, or related framework methods. Comes as an illegal argument exception subclass. Allows to globally set a thread-local validation context description which each exception inherits.

Constructors

ValidationException(String format, Object[] args)

public ValidationException(String format, Object[] args)

Construct validation exception with implicit context.

Parameters
NameDescription
formatString
argsObject[]

Methods

popCurrentThreadValidationContext()

public static void popCurrentThreadValidationContext()

Clears the validation context.

pushCurrentThreadValidationContext(ValidationException.Supplier<String> supplier)

public static void pushCurrentThreadValidationContext(ValidationException.Supplier<String> supplier)

Sets the validation context description. Each thread has its own description, so this is thread safe.

Parameter
NameDescription
supplierSupplier<String>

pushCurrentThreadValidationContext(String context)

public static void pushCurrentThreadValidationContext(String context)
Parameter
NameDescription
contextString