Pop up an error dialog if topic name edit fails

If the REST API returns a failure when editing the topic name, pop
up an error dialog with the error message.

Change-Id: I97bbef5b702cbc78d180d92ad1611d05997a7bbf
This commit is contained in:
David Pursehouse
2012-11-21 17:09:43 +09:00
parent 89af5471ad
commit fd9eed5b48

View File

@@ -16,6 +16,7 @@ package com.google.gerrit.client.changes;
import static com.google.gerrit.client.FormatUtil.mediumFormat;
import com.google.gerrit.client.ErrorDialog;
import com.google.gerrit.client.Gerrit;
import com.google.gerrit.client.ui.AccountLink;
import com.google.gerrit.client.ui.CommentedActionDialog;
@@ -195,8 +196,9 @@ public class ChangeInfoBlock extends Composite {
}
@Override
public void onFailure(Throwable caught) {
public void onFailure(final Throwable caught) {
enableButtons(true);
new ErrorDialog(caught.getMessage()).center();
}});
}
}