File tree 2 files changed +5
-2
lines changed
src/main/java/com/chuntung/plugin/gistsnippet/service
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,8 @@ public class GistException extends RuntimeException {
8
8
GistException (Exception e ) {
9
9
super (e );
10
10
}
11
+
12
+ public GistException (String message ) {
13
+ super (message );
14
+ }
11
15
}
Original file line number Diff line number Diff line change 4
4
5
5
package com .chuntung .plugin .gistsnippet .service ;
6
6
7
-
8
7
import com .intellij .credentialStore .CredentialAttributes ;
9
8
import com .intellij .ide .passwordSafe .PasswordSafe ;
10
9
import com .intellij .openapi .components .ServiceManager ;
@@ -37,7 +36,7 @@ public String getAccessToken() {
37
36
// org.jetbrains.plugins.github.authentication.accounts.GithubAccountManager.getTokenForAccount
38
37
String token = PasswordSafe .getInstance ().getPassword (new CredentialAttributes ("IntelliJ Platform GitHub — " + accountId ));
39
38
if (token == null ) {
40
- logger . warn ("Only support token to access Github API, please add account by token" );
39
+ throw new GistException ("Only token is supported to access GitHub API, please add account through token" );
41
40
}
42
41
return token ;
43
42
}
You can’t perform that action at this time.
0 commit comments