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

[Feature request] Add StackTrace to Task #67

Open
narcodico opened this issue Oct 17, 2020 · 0 comments
Open

[Feature request] Add StackTrace to Task #67

narcodico opened this issue Oct 17, 2020 · 0 comments

Comments

@narcodico
Copy link

Hey @spebbe 👋

I'd like to suggest adding the StackTrace to the left of a task invocation.
So instead of:

@override Task<Either<Object, A>> attempt() => new Task(() => run().then(right).catchError((err) => left<Object, A>(err)));

you'd have:

@override Task<Either<TaskError, A>> attempt() => new Task(() => run().then(right).catchError((e, s) => left<TaskError, A>(TaskError(e, s))));

Where TaskError class would hold the error and the stackTrace.
This would allow for logging/inspecting of the stack if needed.

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