mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Github: show message on exception
This commit is contained in:
@@ -18,6 +18,9 @@ import icons.TasksIcons;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.plugins.github.api.GithubApiUtil;
|
||||
import org.jetbrains.plugins.github.exceptions.GithubAuthenticationException;
|
||||
import org.jetbrains.plugins.github.exceptions.GithubJsonException;
|
||||
import org.jetbrains.plugins.github.exceptions.GithubStatusCodeException;
|
||||
import org.jetbrains.plugins.github.util.GithubAuthData;
|
||||
import org.jetbrains.plugins.github.util.GithubUtil;
|
||||
import org.jetbrains.plugins.github.api.GithubIssue;
|
||||
@@ -81,7 +84,18 @@ public class GithubRepository extends BaseRepositoryImpl {
|
||||
|
||||
@Override
|
||||
public Task[] getIssues(@Nullable String query, int max, long since) throws Exception {
|
||||
return getIssues(query);
|
||||
try {
|
||||
return getIssues(query);
|
||||
}
|
||||
catch (GithubAuthenticationException e) {
|
||||
throw new Exception(e.getMessage(), e);
|
||||
}
|
||||
catch (GithubStatusCodeException e) {
|
||||
throw new Exception(e.getMessage(), e);
|
||||
}
|
||||
catch (GithubJsonException e) {
|
||||
throw new Exception("Bad response format", e);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user