Class UnexpectedMethodError

All Implemented Interfaces:
Serializable

public class UnexpectedMethodError extends RuntimeException
Indicates that a Method object was supplied that was not expected. For instance, Channel.basicGet(java.lang.String, boolean) throws this if it receives anything other than AMQP.Basic.GetOk or AMQP.Basic.GetEmpty, and the DefaultMethodVisitor throws this as the action within each visitor case.
See Also:
  • Constructor Details

    • UnexpectedMethodError

      public UnexpectedMethodError(Method method)
      Construct an UnexpectedMethodError with the given method parameter
      Parameters:
      method - the unexpected method
  • Method Details

    • toString

      public String toString()
      Return a string representation of this error.
      Overrides:
      toString in class Throwable
      Returns:
      a string describing the error
    • getMethod

      public Method getMethod()
      Return the wrapped method.
      Returns:
      the method whose appearance was "unexpected" and was deemed an error