Class DefaultToolExecutionExceptionProcessor.Builder
java.lang.Object
org.springframework.ai.tool.execution.DefaultToolExecutionExceptionProcessor.Builder
- Enclosing class:
- DefaultToolExecutionExceptionProcessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalwaysThrow
(boolean alwaysThrow) Rethrow theToolExecutionException
build()
rethrowExceptions
(List<Class<? extends RuntimeException>> exceptions) An allowlist of exceptions thrown by tools, which will be unwrapped and re-thrown without further processing.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
alwaysThrow
Rethrow theToolExecutionException
- Parameters:
alwaysThrow
- when true, throws; when false, returns the exception message- Returns:
- the builder instance
-
rethrowExceptions
public DefaultToolExecutionExceptionProcessor.Builder rethrowExceptions(List<Class<? extends RuntimeException>> exceptions) An allowlist of exceptions thrown by tools, which will be unwrapped and re-thrown without further processing.- Parameters:
exceptions
- the list of exceptions- Returns:
- the builder instance
-
build
-