Catch all exceptions when async emailing.
Updated the asynchronous emailing code to catch Exception. Also, cleaned up some method signatures that had throws declarations for exceptions that were never thrown. Change-Id: I7525852b3672e07f7878f81c98cb7fc24ae4797b
This commit is contained in:
@@ -30,7 +30,6 @@ import com.google.gerrit.server.ChangeUtil;
|
||||
import com.google.gerrit.server.IdentifiedUser;
|
||||
import com.google.gerrit.server.git.WorkQueue;
|
||||
import com.google.gerrit.server.mail.CommentSender;
|
||||
import com.google.gerrit.server.mail.EmailException;
|
||||
import com.google.gerrit.server.project.ChangeControl;
|
||||
import com.google.gerrit.server.project.InvalidChangeOperationException;
|
||||
import com.google.gerrit.server.project.NoSuchChangeException;
|
||||
@@ -332,7 +331,7 @@ public class PublishComments implements Callable<VoidResult> {
|
||||
} catch (PatchSetInfoNotAvailableException e) {
|
||||
log.error("Cannot read PatchSetInfo of " + patchSetId, e);
|
||||
return;
|
||||
} catch (OrmException e) {
|
||||
} catch (Exception e) {
|
||||
log.error("Cannot email comments for " + patchSetId, e);
|
||||
return;
|
||||
}
|
||||
@@ -344,7 +343,7 @@ public class PublishComments implements Callable<VoidResult> {
|
||||
cm.setChangeMessage(message);
|
||||
cm.setPatchLineComments(drafts);
|
||||
cm.send();
|
||||
} catch (EmailException e) {
|
||||
} catch (Exception e) {
|
||||
log.error("Cannot email comments for " + patchSetId, e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user