File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,17 @@ class CompileDiagnosticProvider {
69
69
const vfs = await this . vfsm . prefetch ( uri ) ;
70
70
const logPath = `${ OUTPUT_FOLDER_NAME } /output.log` ;
71
71
const _uri = vfs . pathToUri ( logPath ) ;
72
- let content = '' ;
73
- content = new TextDecoder ( ) . decode ( await vfs . openFile ( _uri ) ) ;
72
+ let content = '' ;
73
+ try {
74
+ const fileData = await vfs . openFile ( _uri ) ;
75
+ content = new TextDecoder ( ) . decode ( fileData ) ;
76
+ } catch ( error ) {
77
+ if ( error instanceof vscode . FileSystemError && error . code === 'FileNotFound' ) {
78
+ return false ;
79
+ }
80
+ console . error ( 'Error reading log file:' , error ) ;
81
+ throw error ; // Re-throw unexpected errors
82
+ }
74
83
const logs = new LatexParser ( content ) . parse ( ) ;
75
84
if ( logs === undefined ) {
76
85
return content === '' ? true :false ;
You can’t perform that action at this time.
0 commit comments