ChangeEditModifier: Fix exception message when ref cannot be updated
RefUpdate doesn't implement toString and hence the exception message was not very useful. Change-Id: Icf24aa5e9955affd4a369c1c5faa074b8a1460fd Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
parent
8130cfad06
commit
47caf01a7f
|
@ -566,7 +566,13 @@ public class ChangeEditModifier {
|
|||
try (RevWalk revWalk = new RevWalk(repository)) {
|
||||
RefUpdate.Result res = ru.update(revWalk);
|
||||
if (res != RefUpdate.Result.NEW && res != RefUpdate.Result.FORCED) {
|
||||
throw new IOException("update failed: " + ru);
|
||||
throw new IOException(
|
||||
"cannot update "
|
||||
+ ru.getName()
|
||||
+ " in "
|
||||
+ repository.getDirectory()
|
||||
+ ": "
|
||||
+ ru.getResult());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue