mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix NPE in HgErrorHandler
This commit is contained in:
@@ -13,11 +13,15 @@
|
||||
package org.zmlx.hg4idea;
|
||||
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.zmlx.hg4idea.execution.HgCommandResult;
|
||||
|
||||
public abstract class HgErrorHandler {
|
||||
|
||||
public static HgCommandResult ensureSuccess(HgCommandResult result) throws VcsException {
|
||||
public static HgCommandResult ensureSuccess(@Nullable HgCommandResult result) throws VcsException {
|
||||
if (result == null) {
|
||||
throw new VcsException("Couldn't execute Mercurial command");
|
||||
}
|
||||
if (fatalErrorOccurred(result)) {
|
||||
throw new VcsException(result.getRawError());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user