DocoptArgumentError.formatMessage

private string formatMessage(string expected, string got, size_t pos, const string[] argv) @safe

Helper to format a contextual error message.

Notes:

  • pos is stored as a 0-based index internally for programmatic access

(via position()), but for human-facing messages we display it as 1-based to avoid confusing users.