export function exitCodeToUserString()

in src/bazel/bazel_exit_code.ts [54:98]


export function exitCodeToUserString(exitCode: ExitCode): string {
  switch (exitCode) {
    case ExitCode.SUCCESS:
      return "Success!";
    case ExitCode.BUILD_FAILURE:
      return "Build failed: check your build logs for errors.";
    case ExitCode.PARSING_FAILURE:
      return "BUILD file parsing failed: check your BUILD files.";
    case ExitCode.COMMAND_LINE_ERROR:
      return "Command line error: bad or illegal flags.";
    case ExitCode.TESTS_FAILED:
      return "Tests failed: check your test logs for errors.";
    case ExitCode.PARTIAL_ANALYSIS_FAILURE:
      return "Query failed: error during analysis.";
    case ExitCode.NO_TESTS_FOUND:
      return "No test targets were found.";
    case ExitCode.INTERRUPTED:
      return "Command interrupted.";
    case ExitCode.LOCK_HELD_NOBLOCK_FOR_LOCK:
      return "No block for lock: server locked already taken.";
    case ExitCode.REMOTE_ENVIRONMENTAL_ERROR:
      return "Remote Environment error: check your logs.";
    case ExitCode.OOM_ERROR:
      return "Out of Memory error: Try giving Bazel more RAM?";
    case ExitCode.REMOTE_ERROR:
      return "Remote error: check your remote cache and executor.";
    case ExitCode.LOCAL_ENVIRONMENTAL_ERROR:
      return (
        "Local environment error: " +
        "Unable to set up environment correctly, check your logs."
      );
    case ExitCode.INTERNAL_ERROR:
      return "Internal error: Please file a Bazel issue (and try again).";
    case ExitCode.PUBLISH_ERROR:
      return "BES publish error: uploading failed.";
    case ExitCode.REMOTE_EXECUTOR_OVERLOADED:
      return "Remote error: Remote executor is overloaded.";
    case ExitCode.RESERVED:
      return "Reserved error: unexpected, please file a vscode-bazel issue.";
    default:
      return (
        "Unknown error " + exitCode + ": please file a vscode-bazel issue."
      );
  }
}