mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-31 18:01:55 +00:00
Merge pull request #61 from PR0M3TH3AN/fix-empty-catch-blocks-17156965692183891029
🧹 improve observability by adding console.debug to empty catch blocks
This commit is contained in:
1 file changed
+4
-2
+4
-2
@@ -153,7 +153,8 @@ function loadCanonicalRoster() {
|
||||
}
|
||||
|
||||
console.error(`WARNING: Roster file is missing daily/weekly entries, falling back: ${rosterPath}`);
|
||||
} catch {
|
||||
} catch (err) {
|
||||
console.debug(`Note: Could not load roster from ${rosterPath}: ${err.message}`);
|
||||
// It's okay if roster file is missing when used as a library/CLI without the file present
|
||||
}
|
||||
|
||||
@@ -207,7 +208,8 @@ export function parseLockEvent(event) {
|
||||
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
||||
content = parsed;
|
||||
}
|
||||
} catch {
|
||||
} catch (err) {
|
||||
console.debug(`Note: Failed to parse event content as JSON: ${err.message}`);
|
||||
// Ignore malformed JSON content
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user