better debug messages

This commit is contained in:
Luke Berndt
2024-09-01 09:45:00 -04:00
parent 847ed02013
commit 1d2a542448

View File

@@ -50,8 +50,10 @@ exports.initStats = async function () {
try { try {
talkgroupStats = JSON.parse(fileContents); talkgroupStats = JSON.parse(fileContents);
} catch (error) { } catch (error) {
console.error("Error parsing JSON data:", error); console.error("Talkgroup Stats - Error parsing JSON data:", error);
} }
} else {
console.error("Talkgroup Stats File not found: " + filePath);
} }
// Check if the decodeErrorsFreq.json file exists // Check if the decodeErrorsFreq.json file exists
@@ -64,9 +66,12 @@ exports.initStats = async function () {
try { try {
decodeErrorsFreq = JSON.parse(fileContents); decodeErrorsFreq = JSON.parse(fileContents);
} catch (error) { } catch (error) {
console.error("Error parsing JSON data:", error); console.error("Decode Errors - Error parsing JSON data:", error);
} }
} else {
console.error("Decode Errors File not found: " + decodeErrorsFreqPath);
} }
/* /*
for await (const item of SystemStat.find()) { for await (const item of SystemStat.find()) {
const obj = item.toObject(); const obj = item.toObject();