Package dev.langchain4j.internal
Class Exceptions
-
- All Implemented Interfaces:
public class Exceptions
Utility methods for creating common exceptions.
-
-
Method Summary
Modifier and Type Method Description static IllegalArgumentException
illegalArgument(String format, Array<Object> args)
Constructs an IllegalArgumentException with the given formatted result. static RuntimeException
runtime(String format, Array<Object> args)
Constructs an RuntimeException with the given formatted result. -
-
Method Detail
-
illegalArgument
static IllegalArgumentException illegalArgument(String format, Array<Object> args)
Constructs an IllegalArgumentException 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
static RuntimeException runtime(String format, Array<Object> args)
Constructs an RuntimeException 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.
-
-
-
-