File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/main/java/com/chuntung/plugin/gistsnippet/service Expand file tree Collapse file tree 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 {
88 GistException (Exception e ) {
99 super (e );
1010 }
11+
12+ public GistException (String message ) {
13+ super (message );
14+ }
1115}
Original file line number Diff line number Diff line change 44
55package com .chuntung .plugin .gistsnippet .service ;
66
7-
87import com .intellij .credentialStore .CredentialAttributes ;
98import com .intellij .ide .passwordSafe .PasswordSafe ;
109import com .intellij .openapi .components .ServiceManager ;
@@ -37,7 +36,7 @@ public String getAccessToken() {
3736 // org.jetbrains.plugins.github.authentication.accounts.GithubAccountManager.getTokenForAccount
3837 String token = PasswordSafe .getInstance ().getPassword (new CredentialAttributes ("IntelliJ Platform GitHub — " + accountId ));
3938 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" );
4140 }
4241 return token ;
4342 }
You can’t perform that action at this time.
0 commit comments