镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Can the rejectReason values in errors.go be exported (i.e. capitalized) so we can use them? #788

Open

Description

@gbirchmeier

It's weird that NewMessageRejectError and the like are exported, but the values intended to be used for the rejectReason int param are private (e.g. rejectReasonInvalidTagNumber, rejectReasonRequiredTagMissing, etc).

If my own code calls NewMessageRejectError(err,rejectReason,refTagID), then rejectReason must be specified with e.g. 5 or my own lookalike constant instead of me being able to use quickfix.RejectReasonValueIsIncorrect.

If preserving the existing interface wasn't a concern, I'd suggest creating a type RejectReason int and switching all the functions to use it, but that would break compatibility.

However, it would not break compatibility to simply change all the rejectReason* int constants to be caplitalized.

If I submitted such a change would it be accepted? Or is there some other complication that would make this not feasable

Activity

  1. changed the title [-]Can the rejectReason values be exported so we can use them?[/-] [+]Can the rejectReason values in errors.go be exported (i.e. capitalized) so we can use them?[/+] on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions