Skip to content

Flowing context #1

@i3arnon

Description

@i3arnon

Currently a faulted instance doesn't carry any context (other than the exception). It can be somewhat limiting. The only thing you can really do with one is log the exception itself, but multiple Try instances you don't know the origin of it.

I'm not sure what's the appropriate solution here, but do you see this as an issue that needs a solution?

I can imagine adding a Try<TInput, TResult> (which can also avoid capturing):

var block =
    new TransformBlock<string, Try<string, string>>(
        uri => Try.Create(uri, innerUri => client.GetStringAsync(innerUri)));

I can make that a PR if you're interested.
WDYT?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions