File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Extension/src/LanguageServer Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1731,8 +1731,13 @@ export class CppProperties {
17311731 * @returns The result of the operation and the time it took to complete in seconds.
17321732 */
17331733 private async timeOperation < T > ( operation : ( ) => Promise < T | undefined > ) : Promise < { result : T | undefined ; duration : number } > {
1734+ let result : T | undefined ;
17341735 const start = process . hrtime ( ) ;
1735- const result = await Promise . resolve ( operation ( ) ) ;
1736+ try {
1737+ result = await operation ( ) ;
1738+ } catch {
1739+ // Suppress errors
1740+ }
17361741 const diff = process . hrtime ( start ) ;
17371742 const duration = diff [ 0 ] + diff [ 1 ] / 1e9 ; // diff[0] is in seconds, diff[1] is in nanoseconds
17381743 return { result, duration } ;
You can’t perform that action at this time.
0 commit comments