Handle NoSuchChangeException in 'review' SSH command
A NoSuchChangeException in the 'review' SSH command resulted in an 'internal server error'. Now a proper error message is printed out. A NoSuchChangeException e.g. occurs if a user tries to publish a draft change that is not visible to him. Change-Id: I42b5491f98b2de59794abe7e2f4e483439a141e2 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -182,6 +182,9 @@ public class ReviewCommand extends BaseCommand {
|
||||
} catch (UnloggedFailure e) {
|
||||
ok = false;
|
||||
writeError("error: " + e.getMessage() + "\n");
|
||||
} catch (NoSuchChangeException e) {
|
||||
ok = false;
|
||||
writeError("no such change " + patchSetId.getParentKey().get());
|
||||
} catch (Exception e) {
|
||||
ok = false;
|
||||
writeError("fatal: internal server error while approving "
|
||||
|
Reference in New Issue
Block a user