Skip to content

Commit

Permalink
Make FrequencyLimitExceeded, FundsExceeded and Nonce exceptions all e…
Browse files Browse the repository at this point in the history
…xtend ExchangeException
  • Loading branch information
rafalkrupinski committed Jan 23, 2015
1 parent 7117f0d commit 1a6bb98
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ protected RuntimeException handleHttpError(HttpStatusIOException exception) thro

protected RuntimeException handleError(ANXException exception) {
if ("Insufficient Funds".equals(exception.getError()))
return new FundsExceededException();
return new FundsExceededException(exception.getError());
else
return new ExchangeException(exception.getError(), exception);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.xeiam.xchange;

public class FrequencyLimitExceededException extends IllegalStateException {
public class FrequencyLimitExceededException extends ExchangeException {
private static final long serialVersionUID = 2058332277163798808L;

public FrequencyLimitExceededException() {
}

public FrequencyLimitExceededException(String s) {
super(s);
}
Expand All @@ -14,7 +11,4 @@ public FrequencyLimitExceededException(String message, Throwable cause) {
super(message, cause);
}

public FrequencyLimitExceededException(Throwable cause) {
super(cause);
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.xeiam.xchange;

public class FundsExceededException extends IllegalArgumentException {
public class FundsExceededException extends ExchangeException {
private static final long serialVersionUID = 2406896439418334853L;

public FundsExceededException() {
}

public FundsExceededException(String s) {
super(s);
}
Expand All @@ -14,7 +11,4 @@ public FundsExceededException(String message, Throwable cause) {
super(message, cause);
}

public FundsExceededException(Throwable cause) {
super(cause);
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.xeiam.xchange;

public class NonceException extends IllegalArgumentException {
public class NonceException extends ExchangeException {
private static final long serialVersionUID = 565212065616860570L;

public NonceException() {
}

public NonceException(String s) {
super(s);
}
Expand All @@ -14,7 +11,4 @@ public NonceException(String message, Throwable cause) {
super(message, cause);
}

public NonceException(Throwable cause) {
super(cause);
}
}

0 comments on commit 1a6bb98

Please sign in to comment.