diff --git a/electron/main.js b/electron/main.js index 740f3de..e1d60cb 100644 --- a/electron/main.js +++ b/electron/main.js @@ -169,7 +169,9 @@ ipcMain.handle('get-logs', async (event, customPath) => { const content = await fs.readFile(filePath, 'utf8'); return JSON.parse(content); } - } catch (e) { } + } catch (e) { + console.error("Failed to get logs:", e); + } return {}; }); diff --git a/src/App.jsx b/src/App.jsx index eeabdf7..1370caa 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -113,7 +113,9 @@ function App() { osc.onended = () => { osc.disconnect(); gain.disconnect(); audioCtx.close(); }; osc.start(audioCtx.currentTime); osc.stop(audioCtx.currentTime + dur); - } catch (e) { } + } catch (e) { + console.error("Sonic escalation failed:", e); + } }, [enforcementLevel, isEnforced, settings.enforcement?.soundCrescendo]); diff --git a/src/hooks/useAudio.js b/src/hooks/useAudio.js index 8b1afd4..f94685b 100644 --- a/src/hooks/useAudio.js +++ b/src/hooks/useAudio.js @@ -67,7 +67,9 @@ export const useAudio = (settings) => { oscillator.onended = () => { oscillator.disconnect(); gainNode.disconnect(); }; oscillator.start(audioCtx.currentTime); oscillator.stop(audioCtx.currentTime + 1); - } catch (e) { } + } catch (e) { + console.error("Audio failed (alarm):", e); + } }, [getAudioCtx]); const playPeep = useCallback((freq = 660, dur = 0.1) => { @@ -85,7 +87,9 @@ export const useAudio = (settings) => { oscillator.onended = () => { oscillator.disconnect(); gainNode.disconnect(); }; oscillator.start(audioCtx.currentTime); oscillator.stop(audioCtx.currentTime + dur); - } catch (e) { } + } catch (e) { + console.error("Audio failed (peep):", e); + } }, [getAudioCtx]); return {