add try catch

This commit is contained in:
waterbeach 2017-03-20 10:02:36 +08:00
parent bd2d35aba4
commit 88addda10c
1 changed files with 12 additions and 6 deletions

View File

@ -461,13 +461,19 @@ public class MergeProjectNew2 {
public boolean compareGithubProject(GatherProjectsModel model1,
GatherProjectsModel model2) {
if (platformProjectDao.getGithubPrjByUrl(TableName.githubTableName,model1.getUrl())
.getStargazers_count() > platformProjectDao.getGithubPrjByUrl(TableName.githubTableName,
model2.getUrl()).getStargazers_count())
return true;
else
try{
if (platformProjectDao.getGithubPrjByUrl(TableName.githubTableName,model1.getUrl())
.getStargazers_count() > platformProjectDao.getGithubPrjByUrl(TableName.githubTableName,
model2.getUrl()).getStargazers_count())
return true;
else
return false;
} catch (Exception e) {
System.out.println(model1.getUrl());
System.out.println(model2.getUrl());
System.exit(0);
return false;
}
}