GeezerVison is showing github.com — test: remove unreachable code · nodejs/node@e714b56
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: test/message/throw_custom_error.js -4Lines changed: 0 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
2 | 2 | var common = require('../common'); |
3 | 3 | var assert = require('assert'); |
4 | 4 |
|
5 | | -console.error('before'); |
6 | | - |
7 | 5 | // custom error throwing |
8 | 6 | throw ({ name: 'MyCustomError', message: 'This is a custom message' }); |
9 | | - |
10 | | -console.error('after'); |
Collapse file
Copy file name to clipboard +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -before |
2 | | -*test*message*throw_custom_error.js:8 |
| 1 | +*test*message*throw_custom_error.js:6 |
3 | 2 | throw ({ name: 'MyCustomError', message: 'This is a custom message' }); |
4 | 3 | ^ |
5 | 4 | MyCustomError: This is a custom message |
Collapse file
Copy file name to clipboardExpand all lines: test/message/throw_non_error.js -4Lines changed: 0 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
2 | 2 | var common = require('../common'); |
3 | 3 | var assert = require('assert'); |
4 | 4 |
|
5 | | -console.error('before'); |
6 | | - |
7 | 5 | // custom error throwing |
8 | 6 | throw ({ foo: 'bar' }); |
9 | | - |
10 | | -console.error('after'); |
Collapse file
Copy file name to clipboard +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -before |
2 | | -*test*message*throw_non_error.js:8 |
| 1 | +*test*message*throw_non_error.js:6 |
3 | 2 | throw ({ foo: 'bar' }); |
4 | 3 | ^ |
5 | 4 | [object Object] |
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-domain.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -163,7 +163,6 @@ expectCaught++; |
163 | 163 | // as a callback instead. |
164 | 164 | function fn(er) { |
165 | 165 | throw new Error('This function should never be called!'); |
166 | | - process.exit(1); |
167 | 166 | } |
168 | 167 |
|
169 | 168 | var bound = d.intercept(fn); |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-file-write-stream.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
26 | 26 | }) |
27 | 27 | .on('error', function(err) { |
28 | 28 | throw err; |
29 | | - console.error('error!', err.stack); |
30 | 29 | }) |
31 | 30 | .on('drain', function() { |
32 | 31 | console.error('drain!', callbacks.drain); |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-http-content-length.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -40,7 +40,6 @@ var server = http.createServer(function(req, res) { |
40 | 40 | break; |
41 | 41 | default: |
42 | 42 | throw new Error('Unreachable'); |
43 | | - break; |
44 | 43 | } |
45 | 44 |
|
46 | 45 | receivedRequests++; |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-listen-fd-detached-inherit.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -64,8 +64,8 @@ function test() { |
64 | 64 | // Then output the child's pid, and immediately exit. |
65 | 65 | function parent() { |
66 | 66 | var server = net.createServer(function(conn) { |
67 | | - throw new Error('Should not see connections on parent'); |
68 | 67 | conn.end('HTTP/1.1 403 Forbidden\r\n\r\nI got problems.\r\n'); |
| 68 | + throw new Error('Should not see connections on parent'); |
69 | 69 | }).listen(PORT, function() { |
70 | 70 | console.error('server listening on %d', PORT); |
71 | 71 |
|
|