-
Type: Task
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Tech debt
-
None
-
3
-
Not Needed
For this one I'm not sure:
https://github.com/mongodb-js/vscode/blob/1e98a4e9634fe1f298821a1b894b9a5e24902522/src/explorer/databaseTreeItem.ts#L199-L219
My guess is that validateInput is not called synchronously (ie. directly after `vscode.window.showInputBox`) so the try/catch won't catch things in there. Therefore I think that try/catch is probably doing nothing. Similar thing everywhere else we use showInputBox.
Then there are things like this:
https://github.com/mongodb-js/vscode/blob/main/src/language/mongoDBService.ts#L199-L220
on('message') almost certainly happens asynchronously and that try/catch only covers the initial synchronous setup.
I don't know about token.onCancellationRequested. something might await that promise but that thing isn't being awaited in turn, so the catch wrapping it probably isn't doing much.
- is duplicated by
-
VSCODE-290 try {} catch {} used to wrap promise.then
- Closed
- is related to
-
VSCODE-285 try {} catch {} indiscriminately catching all errors
- Closed