mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-06-06 14:15:50 +08:00
优化异常
This commit is contained in:
@@ -27,17 +27,18 @@ import java.io.PrintStream;
|
||||
* @author zhouhao
|
||||
*/
|
||||
public class OAuth2RequestException extends RuntimeException {
|
||||
ErrorType errorType;
|
||||
private static final long serialVersionUID = 6170266627415485170L;
|
||||
private ErrorType errorType;
|
||||
|
||||
OAuth2Response response;
|
||||
private OAuth2Response response;
|
||||
|
||||
public OAuth2RequestException(ErrorType errorType, OAuth2Response response) {
|
||||
super(errorType.name());
|
||||
super(errorType.name() + (errorType == ErrorType.OTHER ? ":" + response.asString() : ""));
|
||||
this.errorType = errorType;
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public OAuth2RequestException(String message,ErrorType errorType, OAuth2Response response) {
|
||||
public OAuth2RequestException(String message, ErrorType errorType, OAuth2Response response) {
|
||||
super(message);
|
||||
this.errorType = errorType;
|
||||
this.response = response;
|
||||
|
||||
Reference in New Issue
Block a user