Environment
- OS and Version: Windows 11 Selfhost (latest version)
- VS Code Version: 1.76.0
- C/C++ Extension Version: 1.14.4
- If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce
Bug Summary:
When executing our extension tests under VSCode's debugger, it constantly hits an uncaught exception due to timeouts (which are actually expected when CppTools calls into our extension)
The implementation of "callTaskWithTimeout" should be authored in a way that doesn't throw uncaught exceptions if the timeout occurs.
});
const configs = yield this.callTaskWithTimeout(provideConfigurationAsync, configProviderTimeout, tokenSource);
try {
callTaskWithTimeout(task, ms, cancelToken) {
let timer;
const timeout = () => new Promise((resolve, reject) => {
timer = global.setTimeout(() => {
clearTimeout(timer);
if (cancelToken) {
cancelToken.cancel();
}
reject(localize(27, null, ms));
}, ms);
});
return Promise.race([task(), timeout()]).then((result) => {
clearTimeout(timer);
return result;
}, (error) => {
clearTimeout(timer);
throw error;
});
}
Steps to reproduce:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior:
Configuration and Logs
Other Extensions
All extensions disabled except for WAVE for VSCode (Windows IntelliSense Information Provider)
Additional context
No response
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
When executing our extension tests under VSCode's debugger, it constantly hits an uncaught exception due to timeouts (which are actually expected when CppTools calls into our extension)
The implementation of "callTaskWithTimeout" should be authored in a way that doesn't throw uncaught exceptions if the timeout occurs.
Steps to reproduce:
Expected behavior:
Configuration and Logs
Other Extensions
All extensions disabled except for WAVE for VSCode (Windows IntelliSense Information Provider)
Additional context
No response