We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53fbfed commit 8a9d3e2Copy full SHA for 8a9d3e2
1 file changed
src/compile/compileManager.ts
@@ -69,8 +69,17 @@ class CompileDiagnosticProvider {
69
const vfs = await this.vfsm.prefetch(uri);
70
const logPath = `${OUTPUT_FOLDER_NAME}/output.log`;
71
const _uri = vfs.pathToUri(logPath);
72
- let content ='';
73
- content = new TextDecoder().decode(await vfs.openFile(_uri));
+ let content = '';
+ 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
83
const logs = new LatexParser(content).parse();
84
if (logs === undefined) {
85
return content === ''? true :false;
0 commit comments