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

Improve module load error message when the directory does not exist #175

Merged
merged 2 commits into from
Feb 8, 2018

Conversation

murgatroid99
Copy link
Member

A couple of times, e.g. in grpc/grpc#6435, people have reported errors indicating that the binary module directory doesn't exist at all, which isn't communicated well. This fixes that.

} catch (readDirError) {
let message = `The gRPC binary module was not installed
This may be fixed by running "npm rebuild"
Original error: ${e.message}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be readDirError.message? (And same with e.code below)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it seems like the first two lines can fit together on a single line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's supposed to be e.message and e.code, because e is the original error that we are trying to communicate.

Also, I just made the structure of the error message match the other error. I could merge those lines, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I merged the lines.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, didn't see that 🙃

@murgatroid99 murgatroid99 merged commit 650b5d5 into grpc:v1.9.x Feb 8, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants