From c899a0952ba7d0d712ddf4f2397b6a3daff43b68 Mon Sep 17 00:00:00 2001 From: zhou-hao Date: Fri, 1 Dec 2017 03:07:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oauth2/client/exception/OAuth2RequestException.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/exception/OAuth2RequestException.java b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/exception/OAuth2RequestException.java index d95236ec8..5d4a04c25 100644 --- a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/exception/OAuth2RequestException.java +++ b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/exception/OAuth2RequestException.java @@ -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;