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

Rethrow Release require exception if Debug require fails #340

Merged
merged 2 commits into from
Aug 6, 2019
Merged

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Aug 6, 2019

Fixes #326

@Tyriar Tyriar added this to the 0.9.0 milestone Aug 6, 2019
@Tyriar Tyriar self-assigned this Aug 6, 2019
@Tyriar Tyriar closed this Aug 6, 2019
@Tyriar Tyriar reopened this Aug 6, 2019
@Tyriar Tyriar merged commit 7bd4c73 into master Aug 6, 2019
@Tyriar Tyriar deleted the rethrow branch August 6, 2019 14:18
@bet4it
Copy link

bet4it commented Nov 9, 2019

We may also need console.error('outerError', outerError) somewhere?

@Tyriar
Copy link
Member Author

Tyriar commented Nov 11, 2019

@bet4it well it gets thrown so you would be able to catch and log it if you want to?

@bet4it
Copy link

bet4it commented Nov 21, 2019

But thus we can't get some useful messages of outerError like The module was compiled against a different Node.js version

@Tyriar
Copy link
Member Author

Tyriar commented Nov 21, 2019

@bet4it it's thrown so you can catch it and log:

let pty;
try {
  pty = require('node-pty');
} catch (outerError) {
  console.error('outerError', outerError);
}

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.

Rethrow error when both release and debug native require fails
2 participants