tools: enable no-throw-literal ESLint rule #11168

Closed
wants to merge 2 commits into
from

Conversation

@Trott
Member

Trott commented Feb 4, 2017

Only throw the Error object itself or an object using the Error object
as base objects for user-defined exceptions.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

tools test

test: throw Error objects instead of literals
test-tls-econnreset and test-http-response-status-message throw literals
instead of Error objects. Use common.fail() which throws an
AssertionError.

@Trott Trott added test tools labels Feb 4, 2017

@jasnell

jasnell approved these changes Feb 4, 2017

tools: enable no-throw-literal ESLint rule
Only throw the Error object itself or an object using the Error object
as base objects for user-defined exceptions.
@cjihrig

cjihrig approved these changes Feb 4, 2017

@targos

targos approved these changes Feb 4, 2017

@jasnell

This comment has been minimized.

Show comment
Hide comment
@Trott

This comment has been minimized.

Show comment
Hide comment
@Trott

Trott Feb 7, 2017

Member

Landed in 78ba494 and 4334658.

Member

Trott commented Feb 7, 2017

Landed in 78ba494 and 4334658.

@Trott Trott closed this Feb 7, 2017

Trott added a commit to Trott/io.js that referenced this pull request Feb 7, 2017

test: throw Error objects instead of literals
test-tls-econnreset and test-http-response-status-message throw literals
instead of Error objects. Use common.fail() which throws an
AssertionError.

PR-URL: nodejs#11168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

Trott added a commit to Trott/io.js that referenced this pull request Feb 7, 2017

tools: enable no-throw-literal ESLint rule
Only throw the Error object itself or an object using the Error object
as base objects for user-defined exceptions.

PR-URL: nodejs#11168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

italoacasas added a commit to italoacasas/node that referenced this pull request Feb 9, 2017

test: throw Error objects instead of literals
test-tls-econnreset and test-http-response-status-message throw literals
instead of Error objects. Use common.fail() which throws an
AssertionError.

PR-URL: nodejs#11168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

italoacasas added a commit to italoacasas/node that referenced this pull request Feb 9, 2017

tools: enable no-throw-literal ESLint rule
Only throw the Error object itself or an object using the Error object
as base objects for user-defined exceptions.

PR-URL: nodejs#11168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

italoacasas added a commit to italoacasas/node that referenced this pull request Feb 14, 2017

test: throw Error objects instead of literals
test-tls-econnreset and test-http-response-status-message throw literals
instead of Error objects. Use common.fail() which throws an
AssertionError.

PR-URL: nodejs#11168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

italoacasas added a commit to italoacasas/node that referenced this pull request Feb 14, 2017

tools: enable no-throw-literal ESLint rule
Only throw the Error object itself or an object using the Error object
as base objects for user-defined exceptions.

PR-URL: nodejs#11168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

KryDos added a commit to KryDos/node that referenced this pull request Feb 25, 2017

test: throw Error objects instead of literals
test-tls-econnreset and test-http-response-status-message throw literals
instead of Error objects. Use common.fail() which throws an
AssertionError.

PR-URL: nodejs#11168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

KryDos added a commit to KryDos/node that referenced this pull request Feb 25, 2017

tools: enable no-throw-literal ESLint rule
Only throw the Error object itself or an object using the Error object
as base objects for user-defined exceptions.

PR-URL: nodejs#11168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 7, 2017

Member

needs backport PRs to land in v4 and v6

Member

jasnell commented Mar 7, 2017

needs backport PRs to land in v4 and v6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment