Class UnexpectedMethodError

All Implemented Interfaces:

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
      method - the unexpected method
  • Method Details

    • toString

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

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