|
1 | 1 | package io.a2a.spec; |
2 | 2 |
|
3 | 3 | /** |
4 | | - * Base exception for A2A Client errors. |
| 4 | + * Base exception for A2A client-specific error conditions. |
| 5 | + * <p> |
| 6 | + * This is a specialized exception hierarchy for client-side errors, distinct from |
| 7 | + * {@link A2AClientException}. It is used for errors that occur during client SDK |
| 8 | + * operations such as validation, state management, and protocol handling. |
| 9 | + * <p> |
| 10 | + * Specialized subclasses: |
| 11 | + * <ul> |
| 12 | + * <li>{@link A2AClientHTTPError} - HTTP transport errors with status codes</li> |
| 13 | + * <li>{@link A2AClientJSONError} - JSON serialization/deserialization errors</li> |
| 14 | + * <li>{@link A2AClientInvalidStateError} - Invalid client state errors</li> |
| 15 | + * <li>{@link A2AClientInvalidArgsError} - Invalid argument errors</li> |
| 16 | + * </ul> |
| 17 | + * |
| 18 | + * @see A2AClientException for general client exceptions |
| 19 | + * @see A2AClientHTTPError for HTTP-specific errors |
| 20 | + * @see A2AClientJSONError for JSON-specific errors |
| 21 | + * @see A2AClientInvalidStateError for invalid state errors |
| 22 | + * @see A2AClientInvalidArgsError for invalid argument errors |
5 | 23 | */ |
6 | 24 | public class A2AClientError extends RuntimeException { |
| 25 | + /** |
| 26 | + * Constructs a new A2AClientError with no detail message. |
| 27 | + */ |
7 | 28 | public A2AClientError() { |
8 | 29 | } |
9 | 30 |
|
| 31 | + /** |
| 32 | + * Constructs a new A2AClientError with the specified detail message. |
| 33 | + * |
| 34 | + * @param message the detail message |
| 35 | + */ |
10 | 36 | public A2AClientError(String message) { |
11 | 37 | super(message); |
12 | 38 | } |
13 | 39 |
|
| 40 | + /** |
| 41 | + * Constructs a new A2AClientError with the specified detail message and cause. |
| 42 | + * |
| 43 | + * @param message the detail message |
| 44 | + * @param cause the cause of this exception |
| 45 | + */ |
14 | 46 | public A2AClientError(String message, Throwable cause) { |
15 | 47 | super(message, cause); |
16 | 48 | } |
|
0 commit comments