pcottle/learnGitBranching · info · CommandResult

help-vague-level

Error message

help-vague-level

What it means

Thrown by Level.getInstantCommands in level/index.js when 'help' or '?' is typed during a normal level. Regular levels do not have a per-level command list to show, so a vague localized hint (help-vague-level) is returned as a CommandResult pointing the user at the goal and the 'hint' command.

Source

Thrown at src/js/level/index.js:619

    delete this.mainVis;
    delete this.goalVis;
    delete this.goalCanvasHolder;
    delete this.goalDragHandler;
    LevelActions.setIsSolvingLevel(false);
  }

  getInstantCommands() {
    var getHint = function() {
      var hint = intl.getHint(this.level);
      if (!hint || !hint.length) {
        return intl.str('no-hint');
      }
      return hint;
    }.bind(this);

    return [
      [/^help$|^\?$/, function() {
        throw new Errors.CommandResult({
          msg: intl.str('help-vague-level')
        });
      }],
      [/^hint$/, function() {
        throw new Errors.CommandResult({
          msg: getHint()
        });
      }]
    ];
  }

  reset(command, deferred) {
    this.gitCommandsIssued = [];

    var commandStr = (command) ? command.get('rawStr') : '';
    if (!this.testOptionOnString(commandStr, 'forSolution')) {
      this.isShowingSolution = false;
    }

View on GitHub (pinned to 5b09d0ff96)

Solutions

  1. No fix needed — intended output
  2. Run 'hint' for a level-specific clue
  3. Consult the goal panel or the app's command reference for full documentation
Defensive patterns

Strategy: try-catch

Try / catch

try { dispatch(input); } catch (e) { if (e instanceof CommandResult) { display(e.msg); } else throw e; }

Prevention

When it happens

Trigger: Entering 'help' or '?' while a standard (non-builder) level is active; the instant regex matches before command parsing, and 'hint' similarly returns getHint().

Common situations: New users looking for command documentation mid-level; expected informational output.

Related errors


AI-assisted analysis of pcottle/learnGitBranching@5b09d0ff96 (2026-08-27). Data as JSON: /api/errors/2242f4062dadb84b. Report an issue: GitHub.