Omit error message when ReceiveCommits gets an exception

As a rule, exception messages are not always useful to end users and
may contain implementation details that we'd rather keep quiet. Admins
can still check the logs.

Change-Id: I88983f17971cb615dc2399d6ebeddb7079dd56b5
This commit is contained in:
Dave Borowitz
2015-01-13 13:30:42 -08:00
parent e6e0378e76
commit 045895c196

View File

@@ -166,7 +166,7 @@ public class AsyncReceiveCommits implements PreReceiveHook {
log.warn(String.format(
"Error in ReceiveCommits while processing changes for project %s",
rc.getProject().getName()), e);
rc.addError("internal error while processing changes " + e.getMessage());
rc.addError("internal error while processing changes");
// ReceiveCommits has tried its best to catch errors, so anything at this
// point is very bad.
for (final ReceiveCommand c : commands) {