Artifact Content
Not logged in

Artifact 1f25ad81693ddb2cb9b9e5c5313c07153b51f2f6:

package org.interledger;

import org.interledger.ilp.InterledgerProtocolError;

import java.util.Objects;

 * Base ILP exception, see RFC REF:
public class InterledgerProtocolException extends InterledgerRuntimeException {

  private static final long serialVersionUID = 1L;

  private final InterledgerProtocolError interledgerProtocolError;

   * Required-args constructor.
   * @param interledgerProtocolError An instance of {@link InterledgerProtocolError} that is the
   *                                 underlying error encapsulated by this exception.
  public InterledgerProtocolException(final InterledgerProtocolError interledgerProtocolError) {
    super("Interledger protocol error.");
    this.interledgerProtocolError =
        .requireNonNull(interledgerProtocolError, "interledgerProtocolError must not be null");

  public InterledgerProtocolError getInterledgerProtocolError() {
    return interledgerProtocolError;