Skip to content

Refactor WebpackError to initialize details as undefined - #6974

Merged
sokra merged 5 commits into
webpack:masterfrom
mohsen1:webpack-error-refactor
Apr 12, 2018
Merged

sokra merged 5 commits into
webpack:masterfrom
mohsen1:webpack-error-refactor

Conversation

@mohsen1

@mohsen1 mohsen1 commented Apr 6, 2018

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?
Refactor

Did you add tests for your changes?
No

If relevant, link to documentation update:
N/A

Summary
As part of #6862 I'm refactoring the base error class to initialize the details member so TypeScript is happy about this class

Does this PR introduce a breaking change?
No

Other information

@mohsen1 mohsen1 mentioned this pull request Apr 8, 2018
27 tasks done
Comment thread lib/WebpackError.js Outdated
Error.captureStackTrace(this, this.constructor);
}

get details() {}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This make it readonly?

@webpack-bot

Copy link
Copy Markdown
Contributor

@mohsen1 Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@sokra Please review the new changes.

@mohsen1

mohsen1 commented Apr 11, 2018

Copy link
Copy Markdown
Contributor Author

@sokra how you assert custom errors?

Comment thread lib/WebpackError.js Outdated
constructor(message) {
super(message);

this.message = message;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this line even needed? Doesn't the Error constructor do that?

@webpack-bot

Copy link
Copy Markdown
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

@sokra
sokra merged commit 4d9eb7c into webpack:master Apr 12, 2018
@sokra

sokra commented Apr 12, 2018

Copy link
Copy Markdown
Member

Thanks

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.

3 participants