

package org.apache.avro;

/** Base class for exceptions thrown to client by server. */
public class AvroRemoteException extends Exception {
  private Object value;

  protected AvroRemoteException() {
  }

  public AvroRemoteException(Throwable value) {
    this(value.toString());
    initCause(value);
  }

  public AvroRemoteException(Object value) {
    super(value != null ? value.toString() : null);
    this.value = value;
  }

  public AvroRemoteException(Object value, Throwable cause) {
    super(value != null ? value.toString() : null, cause);
    this.value = value;
  }

  public Object getValue() {
    return value;
  }
}
