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
catch error in runAsChild callback #15578
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I am afraid it can be breaking change... but for me it is valid behavior
For maintainers only:
|
callback(null, entries, compilation); | ||
} catch (e) { | ||
const err = new WebpackError( | ||
`compiler.runAsChild callback error: ${e}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This swallows the stack trace. Maybe add err.details = e.stack
lib/Compiler.js
Outdated
if (err) return callback(err); | ||
callback(null, entries, compilation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (err) return callback(err); | |
callback(null, entries, compilation); | |
callback(err, entries, compilation); |
Thanks |
What kind of change does this PR introduce?
closes #13624
Did you add tests for your changes?
no need
Does this PR introduce a breaking change?
no
What needs to be documented once your changes are merged?
nothing