org.knowm.xchange.bitcoinde.dto.BitcoindeException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-bitcoinde Show documentation
Show all versions of xchange-bitcoinde Show documentation
XChange implementation for Bitcoin.de exchange.
The newest version!
package org.knowm.xchange.bitcoinde.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Arrays;
public class BitcoindeException extends RuntimeException {
private final BitcoindeError[] errors;
private final int credits;
public BitcoindeException(
@JsonProperty("errors") BitcoindeError[] errors, @JsonProperty("credits") int credits) {
this.errors = errors;
this.credits = credits;
}
public BitcoindeError[] getErrors() {
return errors;
}
public int getCredits() {
return credits;
}
@Override
public String toString() {
return "BitcoindeException{"
+ "errors="
+ Arrays.toString(errors)
+ ", credits="
+ credits
+ "}";
}
@Override
public String getMessage() {
return errors[0].getMessage() + " (" + credits + " credits)"; // just the first error message
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy