Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/compile/compileManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,17 @@ class CompileDiagnosticProvider {
const vfs = await this.vfsm.prefetch(uri);
const logPath = `${OUTPUT_FOLDER_NAME}/output.log`;
const _uri = vfs.pathToUri(logPath);
let content ='';
content = new TextDecoder().decode(await vfs.openFile(_uri));
let content = '';
try {
const fileData = await vfs.openFile(_uri);
content = new TextDecoder().decode(fileData);
} catch (error) {
if (error instanceof vscode.FileSystemError && error.code === 'FileNotFound') {
return false;
}
console.error('Error reading log file:', error);
throw error; // Re-throw unexpected errors
}
const logs = new LatexParser(content).parse();
if (logs === undefined) {
return content === ''? true :false;
Expand Down