Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4a1cb3d

Browse filesBrowse files
BridgeARtargos
authored andcommitted
lib: do not catch user errors
The API caught errors from inside of the users passed through callback. This never caused any issues, since this API is only used internally. Otherwise it would have potentially hidden bugs in user code. Refs: #31133 PR-URL: #31159 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 625ed70 commit 4a1cb3d
Copy full SHA for 4a1cb3d

File tree

Expand file treeCollapse file tree

1 file changed

+4
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-8
lines changed
Open diff view settings
Collapse file

‎lib/internal/util/inspector.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/inspector.js
+4-8Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,11 @@ function sendInspectorCommand(cb, onError) {
1010
if (!hasInspector) return onError();
1111
const inspector = require('inspector');
1212
if (session === undefined) session = new inspector.Session();
13+
session.connect();
1314
try {
14-
session.connect();
15-
try {
16-
return cb(session);
17-
} finally {
18-
session.disconnect();
19-
}
20-
} catch {
21-
return onError();
15+
return cb(session);
16+
} finally {
17+
session.disconnect();
2218
}
2319
}
2420

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.