Skip to content

Add custom error messages to E_INVALIDARG in NumberBox, ScrollPresenter, SnapPoint, and XamlPredicate - #11855

Draft
Lauren Ciha (lauren-ciha) wants to merge 1 commit into
mainfrom
user/laurenciha/invalid-arg-messages
Draft

Add custom error messages to E_INVALIDARG in NumberBox, ScrollPresenter, SnapPoint, and XamlPredicate#11855
Lauren Ciha (lauren-ciha) wants to merge 1 commit into
mainfrom
user/laurenciha/invalid-arg-messages

Conversation

@lauren-ciha

@lauren-ciha Lauren Ciha (lauren-ciha) commented Sep 11, 2026

Copy link
Copy Markdown
Member

Fixes

Helps fix #10322 (keep the issue open post-merge)

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Description

This PR adds custom error messages to the E_INVALIDARG HRESULTs in NumberBox, ScrollPresenter, SnapPoint, and XamlPredicate classes.

Current Behavior

When these exceptions are thrown, the generic error message ("One or more arguments are invalid") is shown to the user.

New Behavior

When these exceptions are thrown, a message explaining why the error was thrown is presented with relevant variables.

Customer Impact

When users hit E_INVALIDARG in these classes, they will be better able to diagnose their code and resolve bugs faster.

Regression Potential

  • Low risk — isolated change, limited scope
  • Medium risk — touches shared components or public APIs
  • High risk — architectural or breaking API change

How Has This Been Tested?

  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • Existing tests pass locally

This PR was written with the assistance of AI.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the needs-triage Issue needs to be triaged by the area owners label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-triage Issue needs to be triaged by the area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Too many Unspecified Errors!

1 participant