package com.zb.mom.ww.mxgateway.client;

/**
 * Thrown when the gateway returns a protocol-OK command reply that carries
 * neither the expected typed payload nor a usable {@code return_value}.
 *
 * <p>A successful reply for a value-returning command (for example
 * {@code AuthenticateUser}, {@code ArchestrAUserToId}, or {@code AddBufferedItem})
 * must supply either the command's typed payload or an int32 {@code return_value}.
 * A reply that satisfies neither is malformed, and the client surfaces this
 * distinct failure rather than silently returning a default {@code 0}.
 */
public final class MxGatewayMalformedReplyException extends MxGatewayException {
    /**
     * Creates a new malformed-reply exception with the supplied message.
     *
     * @param message human-readable description of the malformed reply
     */
    public MxGatewayMalformedReplyException(String message) {
        super(message);
    }

    /**
     * Creates a new malformed-reply exception with the supplied message and cause.
     *
     * @param message human-readable description of the malformed reply
     * @param cause underlying error that triggered the failure
     */
    public MxGatewayMalformedReplyException(String message, Throwable cause) {
        super(message, cause);
    }
}
