File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
extensions/ql-vscode/src/common/logging Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,13 @@ export class TeeLogger implements Logger, Disposable {
5858 } catch ( e ) {
5959 // Write an error message to the primary log, and stop trying to write to the side log.
6060 this . error = true ;
61+ try {
62+ await this . fileHandle ?. close ( ) ;
63+ } catch ( e ) {
64+ void this . logger . log (
65+ `Failed to close file handle: ${ getErrorMessage ( e ) } ` ,
66+ ) ;
67+ }
6168 this . fileHandle = undefined ;
6269 const errorMessage = getErrorMessage ( e ) ;
6370 await this . logger . log (
@@ -76,7 +83,13 @@ export class TeeLogger implements Logger, Disposable {
7683 }
7784
7885 dispose ( ) : void {
79- void this . fileHandle ?. close ( ) ;
86+ try {
87+ void this . fileHandle ?. close ( ) ;
88+ } catch ( e ) {
89+ void this . logger . log (
90+ `Failed to close file handle: ${ getErrorMessage ( e ) } ` ,
91+ ) ;
92+ }
8093 this . fileHandle = undefined ;
8194 }
8295}
You can’t perform that action at this time.
0 commit comments