Class AmqpErrorContext

java.lang.Object
com.azure.core.amqp.exception.AmqpErrorContext
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SessionErrorContext

public class AmqpErrorContext extends Object implements Serializable
Provides context for an AmqpException that occurs in an AmqpConnection, AmqpSession, or AmqpLink.
See Also:
  • Constructor Details

    • AmqpErrorContext

      public AmqpErrorContext(String namespace)
      Creates a new instance with the provided namespace.
      Parameters:
      namespace - The service namespace of the error.
      Throws:
      IllegalArgumentException - when namespace is null or empty.
    • AmqpErrorContext

      public AmqpErrorContext(String namespace, Map<String,Object> errorInfo)
      Creates a new instance with the provided namespace.
      Parameters:
      namespace - The service namespace of the error.
      errorInfo - Additional information associated with the error.
      Throws:
      IllegalArgumentException - when namespace is null or empty.
  • Method Details

    • getNamespace

      public String getNamespace()
      Gets the namespace for this error.
      Returns:
      The namespace for this error.
    • getErrorInfo

      public Map<String,Object> getErrorInfo()
      Gets the map carrying information about the error condition.
      Returns:
      Map carrying additional information about the error.
    • toString

      public String toString()
      Creates a string representation of this ErrorContext.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this ErrorContext.