All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.knowm.xchange.bitflyer.dto.BitflyerException Maven / Gradle / Ivy

There is a newer version: 4.3.17.1
Show newest version
package org.knowm.xchange.bitflyer.dto;

import com.fasterxml.jackson.annotation.JsonProperty;

public class BitflyerException extends RuntimeException {

  @JsonProperty("status")
  private int status;

  @JsonProperty("error_message")
  private String errorMessage;

  @JsonProperty("data")
  private String data;

  public BitflyerException(
      @JsonProperty("status") int status,
      @JsonProperty("error_message") String errorMessage,
      @JsonProperty("data") String data) {
    this.status = status;
    this.errorMessage = errorMessage;
    this.data = data;
  }

  public String getMessage() {
    return errorMessage == null ? (data == null ? String.valueOf(status) : data) : errorMessage;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy