SuccincT icon indicating copy to clipboard operation
SuccincT copied to clipboard

Generic ValueOrError

Open Odonno opened this issue 8 years ago • 3 comments

Is it possible to use ValueOrError<TValue> or even ValueOrError<TValue, TError>?

I mean, what if you want to get a value of a POCO object (as value) and return an Exception (as error)?

Odonno avatar Dec 07 '17 21:12 Odonno

Could not agree more, this looks a lot like Vladimir Khorikov's Result object in his functional courses.

DeafLight avatar Mar 31 '18 14:03 DeafLight

Interesting. I hadn't really thought of using ValueOrError like that, but it does make sense. So I'll add support for ValueOrError<TValue, TError>, I think.

DavidArno avatar Apr 03 '18 12:04 DavidArno

Need to document this new type in the wiki now that v4 is released.

DavidArno avatar Feb 17 '20 10:02 DavidArno