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 {
6969 const vfs = await this . vfsm . prefetch ( uri ) ;
7070 const logPath = `${ OUTPUT_FOLDER_NAME } /output.log` ;
7171 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+ }
7483 const logs = new LatexParser ( content ) . parse ( ) ;
7584 if ( logs === undefined ) {
7685 return content === '' ? true :false ;
You can’t perform that action at this time.
0 commit comments