Class Exceptions
java.lang.Object
dev.langchain4j.internal.Exceptions
Utility methods for creating common exceptions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IllegalArgumentExceptionillegalArgument(String format, Object... args) Constructs anIllegalArgumentExceptionwith the given formatted result.static RuntimeExceptionConstructs anRuntimeExceptionwith the given formatted result.static Throwable
-
Method Details
-
illegalArgument
Constructs anIllegalArgumentExceptionwith the given formatted result.Equivalent to
new IllegalArgumentException(String.format(format, args)).- Parameters:
format- the format stringargs- the format arguments- Returns:
- the constructed exception.
-
runtime
Constructs anRuntimeExceptionwith the given formatted result.Equivalent to
new RuntimeException(String.format(format, args)).- Parameters:
format- the format stringargs- the format arguments- Returns:
- the constructed exception.
-
unwrapRuntimeException
-