|
1 | 1 | package io.a2a.spec; |
2 | 2 |
|
3 | 3 | /** |
4 | | - * Exception to indicate a general failure related to an A2A client. |
| 4 | + * Exception indicating a client-side failure in A2A Protocol operations. |
| 5 | + * <p> |
| 6 | + * This exception is thrown by A2A client implementations when encountering errors |
| 7 | + * during communication with agents, response validation, or client-side processing. |
| 8 | + * <p> |
| 9 | + * Common scenarios: |
| 10 | + * <ul> |
| 11 | + * <li>Network communication failures</li> |
| 12 | + * <li>Invalid agent responses ({@link A2AClientError})</li> |
| 13 | + * <li>HTTP errors ({@link A2AClientHTTPError})</li> |
| 14 | + * <li>JSON parsing errors ({@link A2AClientJSONError})</li> |
| 15 | + * </ul> |
| 16 | + * |
| 17 | + * @see A2AException for the base exception class |
| 18 | + * @see A2AServerException for server-side errors |
| 19 | + * @see A2AClientError for more specific client errors |
5 | 20 | */ |
6 | 21 | public class A2AClientException extends A2AException { |
7 | 22 |
|
| 23 | + /** |
| 24 | + * Constructs a new A2AClientException with no detail message or cause. |
| 25 | + */ |
8 | 26 | public A2AClientException() { |
9 | 27 | super(); |
10 | 28 | } |
11 | 29 |
|
| 30 | + /** |
| 31 | + * Constructs a new A2AClientException with the specified detail message. |
| 32 | + * |
| 33 | + * @param msg the detail message |
| 34 | + */ |
12 | 35 | public A2AClientException(final String msg) { |
13 | 36 | super(msg); |
14 | 37 | } |
15 | 38 |
|
| 39 | + /** |
| 40 | + * Constructs a new A2AClientException with the specified cause. |
| 41 | + * |
| 42 | + * @param cause the cause of this exception |
| 43 | + */ |
16 | 44 | public A2AClientException(final Throwable cause) { |
17 | 45 | super(cause); |
18 | 46 | } |
19 | 47 |
|
| 48 | + /** |
| 49 | + * Constructs a new A2AClientException with the specified detail message and cause. |
| 50 | + * |
| 51 | + * @param msg the detail message |
| 52 | + * @param cause the cause of this exception |
| 53 | + */ |
20 | 54 | public A2AClientException(final String msg, final Throwable cause) { |
21 | 55 | super(msg, cause); |
22 | 56 | } |
|
0 commit comments