update trycatch runtime
This commit is contained in:
parent
411f135a70
commit
4696f155c4
|
|
@ -99,6 +99,7 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
|
||||
// Watch for changes in the files listed
|
||||
async function watchFilesInList() {
|
||||
try {
|
||||
//only check new file ---> fileList - fileList_old = new file
|
||||
let listFileWatch = fileList
|
||||
?.filter((i) => fileList_old.includes(i) === false)
|
||||
|
|
@ -210,7 +211,8 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
|
||||
if (
|
||||
checkSpecialVersion(line) !== "" &&
|
||||
listExcludeErr.filter((err) => line.includes(err)).length === 0
|
||||
listExcludeErr.filter((err) => line.includes(err)).length ===
|
||||
0
|
||||
) {
|
||||
let checkVersion = checkSpecialVersion(line);
|
||||
let log = allFile?.filter(
|
||||
|
|
@ -244,8 +246,8 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
// console.log({line:Array(line), value:Array(value)})
|
||||
if (
|
||||
line.includes(value) &&
|
||||
listExcludeErr.filter((err) => line.includes(err)).length ===
|
||||
0
|
||||
listExcludeErr.filter((err) => line.includes(err))
|
||||
.length === 0
|
||||
) {
|
||||
let log = allFile?.filter(
|
||||
(i) => i.$original.file_name === fileName
|
||||
|
|
@ -405,7 +407,6 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
);
|
||||
}
|
||||
}, 3000);
|
||||
// console.log(path + " change")
|
||||
});
|
||||
|
||||
watcher.on("error", (error) => {
|
||||
|
|
@ -418,6 +419,9 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
// const filePath = `${folderPath}/${fileName}`;
|
||||
|
||||
// });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
|
|
|||
Loading…
Reference in New Issue