Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors.Add has no effect #224

Open
michaelmcneilnet opened this issue Sep 23, 2024 · 1 comment
Open

Errors.Add has no effect #224

michaelmcneilnet opened this issue Sep 23, 2024 · 1 comment

Comments

@michaelmcneilnet
Copy link
Contributor

FluentResult v3.16.0

var result = new Result();
result.Errors.Add(new Error("A"));
var errorCount = result.Errors.Count();

errorCount is 0 but I'd expect 1
result.IsFailed is false, but I'd expect true

var result = new Result();
result.Reasons.Add(new Error("A"));
var errorCount = result.Errors.Count();

errorCount is 1
result.IsFailed is true

@michaelmcneilnet michaelmcneilnet changed the title Errors.Add does not have an effect Errors.Add has no effect Sep 23, 2024
@michaelmcneilnet
Copy link
Contributor Author

michaelmcneilnet commented Sep 24, 2024

I think I've fallen into the trap raised by #197 which is fixed in the open PR #164

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

No branches or pull requests

1 participant