Class GuardrailException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.quarkiverse.langchain4j.guardrails.GuardrailException
All Implemented Interfaces:
Serializable

public class GuardrailException extends RuntimeException
Exception thrown when a input or output guardrail validation fails.

This exception is not intended to be used in guardrail implementation. Instead, guardrail implementations should throw OutputGuardrail.ValidationException or InputGuardrail.ValidationException when the validation fails.

See Also:
  • Constructor Details

    • GuardrailException

      public GuardrailException(String message, Throwable cause)