Package org.apache.maven.api.cache
Class BatchRequestException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.maven.api.cache.BatchRequestException
- All Implemented Interfaces:
Serializable
Exception thrown when a batch request operation fails. This exception contains the results
of all requests that were attempted, including both successful and failed operations.
The exception provides access to detailed results through getResults()
, allowing
callers to determine which specific requests failed and why.
- Since:
- 4.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBatchRequestException
(String message, List<RequestResult<REQ, REP>> allResults) Constructs a new BatchRequestException with the specified message and results. -
Method Summary
Modifier and TypeMethodDescriptionList<RequestResult<?,
?>> Returns the list of results from all requests that were part of the batch operation.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BatchRequestException
Constructs a new BatchRequestException with the specified message and results.- Type Parameters:
REQ
- The type of the requestREP
- The type of the response- Parameters:
message
- The error message describing the batch operation failureallResults
- List of results from all attempted requests in the batch
-
-
Method Details
-
getResults
Returns the list of results from all requests that were part of the batch operation. Each result contains the original request, the response (if successful), and any error that occurred during processing.- Returns:
- An unmodifiable list of request results
-