类 A2AError

所有已实现的接口:
Serializable

public class A2AError extends RuntimeException
Exception class for A2A protocol errors. This exception contains error codes, additional data, and task-specific information to provide comprehensive error context in A2A protocol communications.
另请参阅:
  • 字段详细资料

    • INVALID_PARAMS

      public static final int INVALID_PARAMS
      Invalid parameters error code
      另请参阅:
    • METHOD_NOT_FOUND

      public static final int METHOD_NOT_FOUND
      Method not found error code
      另请参阅:
    • TASK_NOT_FOUND

      public static final int TASK_NOT_FOUND
      Task not found error code
      另请参阅:
    • TASK_CANCELLED

      public static final int TASK_CANCELLED
      Task already cancelled error code
      另请参阅:
    • AGENT_EXECUTION_ERROR

      public static final int AGENT_EXECUTION_ERROR
      Agent execution error code
      另请参阅:
    • AUTHENTICATION_ERROR

      public static final int AUTHENTICATION_ERROR
      Authentication error code
      另请参阅:
    • AUTHORIZATION_ERROR

      public static final int AUTHORIZATION_ERROR
      Authorization error code
      另请参阅:
  • 构造器详细资料

    • A2AError

      public A2AError()
      Default constructor
    • A2AError

      public A2AError(String message)
      Constructor with message
      参数:
      message - The error message
    • A2AError

      public A2AError(String message, Throwable cause)
      Constructor with message and cause
      参数:
      message - The error message
      cause - The cause
    • A2AError

      public A2AError(String message, int code, Object data, String taskId)
      Constructor with all properties
      参数:
      message - The error message
      code - The error code
      data - Additional data
      taskId - The task ID
    • A2AError

      public A2AError(String message, int code, Object data)
      Constructor with all properties
      参数:
      message - The error message
      code - The error code
      data - Additional data
    • A2AError

      public A2AError(String message, Throwable cause, int code, Object data, String taskId)
      Constructor with all properties and cause
      参数:
      message - The error message
      cause - The cause
      code - The error code
      data - Additional data
      taskId - The task ID
  • 方法详细资料

    • getCode

      public int getCode()
      Gets the error code
      返回:
      The error code
    • setCode

      public void setCode(int code)
      Sets the error code
      参数:
      code - The error code to set
    • getData

      public Object getData()
      Gets the additional data
      返回:
      The additional data
    • setData

      public void setData(Object data)
      Sets the additional data
      参数:
      data - The additional data to set
    • getTaskId

      public String getTaskId()
      Gets the task ID
      返回:
      The task ID
    • setTaskId

      public void setTaskId(String taskId)
      Sets the task ID
      参数:
      taskId - The task ID to set
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Throwable
    • builder

      public static A2AError.Builder builder()
      Returns a builder for A2AError
      返回:
      A new builder instance