io.github.vipcxj.jasync.ng.spec.exceptions.JAsyncAfterRejectedException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jasync-spec Show documentation
Show all versions of jasync-spec Show documentation
JAsync implements Async-Await fashion for Java just like es and c#.
This library provide the spec of all public api.
package io.github.vipcxj.jasync.ng.spec.exceptions;
public class JAsyncAfterRejectedException extends JAsyncException {
private final Throwable error;
public JAsyncAfterRejectedException(Throwable error, String message) {
super(message);
this.error = error;
}
public JAsyncAfterRejectedException(Throwable error) {
this(error, null);
}
public Throwable getError() {
return error;
}
@Override
public String getMessage() {
String message = super.getMessage();
return message != null ? message : "Some errors happened when invoking the callbacks after the promise rejected. The errors are stored as suspended exceptions.";
}
}