当前位置: 首页>>代码示例>>Java>>正文


Java VcsException.getMessage方法代码示例

本文整理汇总了Java中com.intellij.openapi.vcs.VcsException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java VcsException.getMessage方法的具体用法?Java VcsException.getMessage怎么用?Java VcsException.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.vcs.VcsException的用法示例。


在下文中一共展示了VcsException.getMessage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: step

import com.intellij.openapi.vcs.VcsException; //导入方法依赖的package包/类
public MyResult step(DiffChainContext context) {
  final DiffRequestPresentable request;
  try {
    request = initRequest();
    myStepResult = request.step(context);
  }
  catch (VcsException e) {
    myStepResult = new MyResult(null, DiffPresentationReturnValue.quit, e.getMessage());
  }
  return myStepResult;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:DiffRequestPresentableProxy.java

示例2: cleanupExceptionText

import com.intellij.openapi.vcs.VcsException; //导入方法依赖的package包/类
@NotNull
private static VcsException cleanupExceptionText(VcsException original) {
  String msg = original.getMessage();
  msg = GitUtil.cleanupErrorPrefixes(msg);
  final String DURING_EXECUTING_SUFFIX = GitSimpleHandler.DURING_EXECUTING_ERROR_MESSAGE;
  int suffix = msg.indexOf(DURING_EXECUTING_SUFFIX);
  if (suffix > 0) {
    msg = msg.substring(0, suffix);
  }
  return new VcsException(msg.trim(), original.getCause());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:GitCheckinEnvironment.java

示例3: isMergeCommit

import com.intellij.openapi.vcs.VcsException; //导入方法依赖的package包/类
/**
 * Check if commit has failed due to unfinished merge or cherry-pick.
 *
 *
 * @param ex an exception to examine
 * @return true if exception means that there is a partial commit during merge
 */
private static PartialOperation isMergeCommit(final VcsException ex) {
  String message = ex.getMessage();
  if (message.contains("fatal: cannot do a partial commit during a merge")) {
    return PartialOperation.MERGE;
  }
  if (message.contains("fatal: cannot do a partial commit during a cherry-pick")) {
    return PartialOperation.CHERRY_PICK;
  }
  return PartialOperation.NONE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:GitCheckinEnvironment.java

示例4: saveLocalChanges

import com.intellij.openapi.vcs.VcsException; //导入方法依赖的package包/类
@Nullable
private String saveLocalChanges(@NotNull Collection<VirtualFile> rootsToSave) {
  try {
    mySaver.saveLocalChanges(rootsToSave);
    return null;
  }
  catch (VcsException e) {
    LOG.warn(e);
    return "Couldn't " + mySaver.getSaverName() + " local uncommitted changes:<br/>" + e.getMessage();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:GitRebaseProcess.java

示例5: handleRebaseFailure

import com.intellij.openapi.vcs.VcsException; //导入方法依赖的package包/类
/**
 * @return true if the failure situation was resolved successfully, false if we failed to resolve the problem.
 */
private boolean handleRebaseFailure(final VirtualFile root, final GitLineHandler h, GitRebaseProblemDetector rebaseConflictDetector) {
  if (rebaseConflictDetector.isMergeConflict()) {
    LOG.info("handleRebaseFailure merge conflict");
    return new GitConflictResolver(myProject, myGit, ServiceManager.getService(GitPlatformFacade.class), Collections.singleton(root), makeParamsForRebaseConflict()) {
      @Override protected boolean proceedIfNothingToMerge() {
        return continueRebase(root, "--continue");
      }

      @Override protected boolean proceedAfterAllMerged() {
        return continueRebase(root, "--continue");
      }
    }.merge();
  }
  else if (rebaseConflictDetector.isNoChangeError()) {
    LOG.info("handleRebaseFailure no changes error detected");
    try {
      if (GitUtil.hasLocalChanges(true, myProject, root)) {
        LOG.error("The rebase detector incorrectly detected 'no changes' situation. Attempting to continue rebase.");
        return continueRebase(root);
      }
      else if (GitUtil.hasLocalChanges(false, myProject, root)) {
        LOG.warn("No changes from patch were not added to the index. Adding all changes from tracked files.");
        stageEverything(root);
        return continueRebase(root);
      }
      else {
        GitRebaseUtils.CommitInfo commit = GitRebaseUtils.getCurrentRebaseCommit(root);
        LOG.info("no changes confirmed. Skipping commit " + commit);
        mySkippedCommits.add(commit);
        return continueRebase(root, "--skip");
      }
    }
    catch (VcsException e) {
      LOG.info("Failed to work around 'no changes' error.", e);
      String message = "Couldn't proceed with rebase. " + e.getMessage();
      GitUIUtil.notifyImportantError(myProject, "Error rebasing", message);
      return false;
    }
  }
  else {
    LOG.info("handleRebaseFailure error " + h.errors());
    GitUIUtil.notifyImportantError(myProject, "Error rebasing", GitUIUtil.stringifyErrors(h.errors()));
    return false;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:49,代码来源:GitRebaser.java


注:本文中的com.intellij.openapi.vcs.VcsException.getMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。