Debug Console always shows errors open startup of Codetour
AlexanderLill opened this issue · comments
Hey everyone,
I have the codetours extension installed, and when I open the debug console panel in vscode, the following errors are shown. Maybe there is a way to avoid these when the tours
folder does not exist?
Also, it was quite a hassle to identify where these error messages come from, as the debug console does not indicate from which extension/code file the messages originate.
I have version v0.0.59 of CodeTour and version Version: 1.87.2 of vscode.
[node.js fs] readdir with filetypes failed with error: Error: ENOENT: no such file or directory, scandir '/Users/username/code/reponame/.vscode/tours' {errno: -2, code: 'ENOENT', syscall: 'scandir', path: '/Users/username/code/reponame/.vscode/tours', stack: 'Error: ENOENT: no such file or directory, sca…'/Users/username/code/reponame/.vscode/tours'', …}
extensionHostProcess.js:144
[node.js fs] readdir with filetypes failed with error: Error: ENOENT: no such file or directory, scandir '/Users/username/code/reponame/.github/tours' {errno: -2, code: 'ENOENT', syscall: 'scandir', path: '/Users/username/code/reponame/.github/tours', stack: 'Error: ENOENT: no such file or directory, sca…'/Users/username/code/reponame/.github/tours'', …}
extensionHostProcess.js:144
[node.js fs] readdir with filetypes failed with error: Error: ENOENT: no such file or directory, scandir '/Users/username/code/reponame/.tours' {errno: -2, code: 'ENOENT', syscall: 'scandir', path: '/Users/username/code/ts-wifi-test/.tours', stack: 'Error: ENOENT: no such file or directory, scandir '/Users/username/code/reponame/.tours'', …}
Seems that the discoverMainTours
function uses a try/catch to avoid these errors, while the discoverSubTours
function does not do that:
codetour/src/store/provider.ts
Lines 88 to 94 in 9f29dd9
codetour/src/store/provider.ts
Lines 141 to 144 in 9f29dd9