Skip to content

Should throw instead of returning "Try again" when a valid password cannot be found #13

@rasitha1

Description

@rasitha1

Can the call to .Next() throw instead of returning a password called "Try again" when a valid password could not be generated in maximumAttempts?

I think it's a big risk to return a string like that as the calling application has no way to know what was returned is not a valid password.

A dedicated exception type would be a bonus.

                password = PasswordIsValid(Settings, password) ? password : "Try again";

Source

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions