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

Better error printing in non-browser environments (node.js) #194

Merged
merged 3 commits into from Mar 16, 2016

Conversation

fasterthanlime
Copy link
Contributor

I'm using redux-saga in an Electron app and most of my sagas run node-side.

In node.js, error objects passed to console.warn or console.error just print the error's prototype name and message, not the trace:

stack-trace

I changed it to manually print the trace, if one is available:

sample-error

It could be improved even more by tracking the whole saga chain so we know how we ended up there, but that's already a big step up :)

yelouafi added a commit that referenced this pull request Mar 16, 2016
Better error printing in non-browser environments (node.js)
@yelouafi yelouafi merged commit 17d9b8e into redux-saga:master Mar 16, 2016
@yelouafi
Copy link
Member

Thanks this would be very useful also in my unit tests

@yelouafi
Copy link
Member

It could be improved even more by tracking the whole saga chain so we know how we ended up there

yeah, I think it could be achieved by passing the call hierarchy as param to proc

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.

None yet

2 participants