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

Roc logging doesn't work in verbose mode if error.stack is falsy #197

Open
Alxandr opened this issue Jan 3, 2018 · 0 comments
Open

Roc logging doesn't work in verbose mode if error.stack is falsy #197

Alxandr opened this issue Jan 3, 2018 · 0 comments
Labels

Comments

@Alxandr
Copy link

Alxandr commented Jan 3, 2018

I had a library give me errors that had error.stack set to false, which roc just logs as false (instead of the error message). See:

image

This is not very helpful as the error message is lost, and I have to step through roc code to figure out what went wrong.

The offending piece of code can be found here and here. I suggest adding a check (in addition to whether or not verbose logging is enabled) to see if error.stack is truthy. Something like this:

return `\n\n${getContext().verbose && error.stack ? error.stack : error.toString().replace(/^Error: /, '')}`;
@dlmr dlmr added the bug label Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants