Skip to content

IGNITE-24620 .NET: Use standard LINQ exceptions in First/Single operations#7903

Merged
ptupitsyn merged 2 commits into
apache:mainfrom
rezataroosheh:IGNITE-24620
Mar 31, 2026
Merged

IGNITE-24620 .NET: Use standard LINQ exceptions in First/Single operations#7903
ptupitsyn merged 2 commits into
apache:mainfrom
rezataroosheh:IGNITE-24620

Conversation

@rezataroosheh
Copy link
Copy Markdown
Contributor

This PR aligns exception behavior in .NET LINQ operations (First and Single) with standard LINQ semantics.

Previously, Ignite returned custom exception messages (e.g., "ResultSet is empty") when the result count was unexpected. This change ensures that standard InvalidOperationException messages are used instead.

Replaced custom exception messages with standard LINQ messages:

  • "Sequence contains no elements"
  • "Sequence contains more than one element"

https://issues.apache.org/jira/browse/IGNITE-24620

@ptupitsyn
Copy link
Copy Markdown
Contributor

@rezataroosheh please update the tests, we have some failures because the message has changed:
image

@ptupitsyn ptupitsyn changed the title IGNITE-24620 Use standard LINQ exceptions in First/Single operations IGNITE-24620 .NET: Use standard LINQ exceptions in First/Single operations Mar 31, 2026
@ptupitsyn ptupitsyn merged commit e2d538b into apache:main Mar 31, 2026
5 checks passed
@ptupitsyn
Copy link
Copy Markdown
Contributor

@rezataroosheh thank you!

@rezataroosheh rezataroosheh deleted the IGNITE-24620 branch March 31, 2026 10:35
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.

2 participants