Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Part 2 - Improve ValidateCount attribute error message#3656

Merged
daxian-dbw merged 2 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
iSazonov:validatecount-message2iSazonov/PowerShell:validatecount-message2Copy head branch name to clipboard
May 2, 2017
Merged

Part 2 - Improve ValidateCount attribute error message#3656
daxian-dbw merged 2 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
iSazonov:validatecount-message2iSazonov/PowerShell:validatecount-message2Copy head branch name to clipboard

Conversation

@iSazonov

Copy link
Copy Markdown
Collaborator

Based on discussion #3596 (comment)

Leave only two message for:

  1. Count is not in allowed range.
  2. Count is not exactly equal allowed value.

/cc @lzybkr @mklement0

Leave only two message for:
1. Count is not in allowed range.
2. Count is not exactly equal allowed value.
@iSazonov

Copy link
Copy Markdown
Collaborator Author

Mac build temporary failed.

throw new ValidationMetadataException("ValidateCountSmallerThanMin",
null, Metadata.ValidateCountFailure,
MinLength, MaxLength, len);
throw new ValidationMetadataException("ValidateCountExactlyFailure",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, but I suggest removing the "ly": ValidateCountExactlyFailure -> ValidateCountExactFailure

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Fixed.

@iSazonov iSazonov force-pushed the validatecount-message2 branch from 1583c3b to bdd53bf Compare April 28, 2017 03:54
@daxian-dbw

Copy link
Copy Markdown
Member

@lzybkr the FullyQualifiedErrorId changed with this PR, does it need to be reviewed by powershell committee as a breaking change?

@lzybkr

lzybkr commented May 1, 2017

Copy link
Copy Markdown
Contributor

We should document the change, but it's an unlikely breaking change - changing the exception type would be worth discussing, but in this specific case, the error id isn't very interesting.

@daxian-dbw daxian-dbw merged commit 3d7ef43 into PowerShell:master May 2, 2017
@iSazonov iSazonov deleted the validatecount-message2 branch May 3, 2017 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.