Skip to content

Improve error message when an invalid enum value is provided. #605

@BugelNiels

Description

@BugelNiels

When an invalid enum value is provided in a config, the string_to_enum method will simply say:

stoi

It would be nice if we could improve this error message to be a bit more informative. For example, along the lines of:

Invalid enum value: 'bart'. Must be one of [red, green, blue, yellow].

I have already implemented this change; I'll link the PR shortly. Let me know if this looks good.

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