Package dev.langchain4j.internal
Class Exceptions
java.lang.Object
dev.langchain4j.internal.Exceptions
Utility methods for creating common exceptions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IllegalArgumentException
illegalArgument
(String format, Object... args) Constructs anIllegalArgumentException
with the given formatted result.static RuntimeException
Constructs anRuntimeException
with the given formatted result.
-
Method Details
-
illegalArgument
Constructs anIllegalArgumentException
with 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 anRuntimeException
with the given formatted result.Equivalent to
new RuntimeException(String.format(format, args))
.- Parameters:
format
- the format stringargs
- the format arguments- Returns:
- the constructed exception.
-